Answers for "short for loop in java"

10

enhanced for loop java

class AssignmentOperator {
   public static void main(String[] args) {
      
      char[] vowels = {'a', 'e', 'i', 'o', 'u'};
      // foreach loop
      for (char item: vowels) {
         System.out.println(item);
      }
   }
}
Posted by: Guest on March-04-2020
0

shortcut for for loop in java

int[] numArray = {10, 20, 30, 40};
 
for(int num : numArray) 
{
        System.out.println(num);
}
Posted by: Guest on December-12-2020
10

enhanced for loop java

class AssignmentOperator {
   public static void main(String[] args) {
      
      char[] vowels = {'a', 'e', 'i', 'o', 'u'};
      // foreach loop
      for (char item: vowels) {
         System.out.println(item);
      }
   }
}
Posted by: Guest on March-04-2020
0

shortcut for for loop in java

int[] numArray = {10, 20, 30, 40};
 
for(int num : numArray) 
{
        System.out.println(num);
}
Posted by: Guest on December-12-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language