Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

for cicle Java

for (int i = 0; i < 5; i++) {
  System.out.println(i);
  
  // the integer name does not need to be i, and the loop
  //doesn't need to start at 0. In addition, the 10 can be replaced
  //with any value. In this case, the loop will run 10 times.
  //Finally, the incrementation of i can be any value, in this case,
  //i increments by one. To increment by 2, for example, you would
  //use "i += 2", or "i = i+2"
  
}
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #cicle #Java
ADD COMMENT
Topic
Name
1+7 =