SyntaxFix
Write A Post
Hire A Developer
Questions
You can use forEach starting from Java 8:
List<String> nameList = new ArrayList<>( Arrays.asList("USA", "USSR", "UK")); nameList.forEach((v) -> System.out.println(v));