Skip to content

Instantly share code, notes, and snippets.

@minte9
Last active August 31, 2021 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minte9/07a0dd34b82d1095fff71b551ce583f5 to your computer and use it in GitHub Desktop.
Save minte9/07a0dd34b82d1095fff71b551ce583f5 to your computer and use it in GitHub Desktop.
/**
* Make a for-each loop and ...
* Output all names
*/
class LearningApp {
public static void main(String[] args) {
String[] names = {"John", "Marry", "Ana"};
/**
* SOLUTION
*/
for (String name : names) {
System.out.println(name); // John Marry Ana
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment