In the fourth part of the Java tutorial for beginners video series using Eclipse, we look using loops to make your code repeat statements multiple times. We also take a look at conditions.
Code for this tutorial:
public class Application {
public static void main(String[] args) {
int value = 0;
while(value < 10)
{
System.out.println("Hello " + value);
value = value + 1;
}
}
}
Hello 0 Hello 1 Hello 2 Hello 3 Hello 4 Hello 5 Hello 6 Hello 7 Hello 8 Hello 9
Learn to program Java Swing with my complete video course - desktop programming and applets. Includes 7 free videos. Click here for details.
All pages on this site are copyright © 2013 John W. Purcell