Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lessons;
- public class WhileLoop
- {
- public static void main(String[] args)
- {
- int x = 0;
- //one cycle of a loop is an 'iteration', to keep tract of count you need control variable
- while (x<5)
- {
- System.out.println("hello");
- x++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement