Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class forLooping
- {
- public static void main(String[] args)
- {
- int x = 3;
- for (int i = 0; i < 10; i++)
- {
- System.out.println("Current value of x is " + x + " current value of i is " + i);
- x = x + i;
- } //end for loop
- System.out.println("The final value of x is " + x);
- } //end main
- } //end class
Advertisement
Add Comment
Please, Sign In to add comment