Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- //this is a repitition statement
- //
- public class RepititionStatements {
- public static void main(String [] args) {
- //this is a do-while loop
- int x = 1;
- do
- {
- System.out.println("the value of x : " + x);
- x++;
- } while (x < 10);
- }
- }
- --copy until here--
- OUTPUT:
- the value of x : 1
- the value of x : 2
- the value of x : 3
- the value of x : 4
- the value of x : 5
- the value of x : 6
- the value of x : 7
- the value of x : 8
- the value of x : 9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement