enhanced for-loop,
for (String element : array) { System.out.println("Element: " + element);}
enhanced for-loop,
for (String element : array) { System.out.println("Element: " + element);}
enhanced for loops
String[] myArray = {"Enhanced for loops", "are cool", "and save time!"};
for (String myValue : myArray) {
System.out.println(myValue);
}
/*Result:
Enhanced for loops
are cool
and save time!
*/
enhanced for-loop,
for (String element : array) { System.out.println("Element: " + element);}
enhanced for loops
String[] myArray = {"Enhanced for loops", "are cool", "and save time!"};
for (String myValue : myArray) {
System.out.println(myValue);
}
/*Result:
Enhanced for loops
are cool
and save time!
*/
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us