Kartier Pohs

Tuesday, June 16, 2015

Increment and Decrement operators in Java



Increment and Decrement operators in Java
Increment and Decrement operators in Java
class IncrementOperator
{
 public static void main(String args[])
   {
     int m=10,n=20;
     System.out.println("m= " +m);
     System.out.println("n= " +n);
     System.out.println("++m= " + ++m);
     System.out.println("n++= " + n++);
     System.out.println("m= " +m);
     System.out.println("n= " +n);
   }
}
OUTPUT
Increment and Decrement operators in Java

No comments:

Post a Comment

Copyright 2015 @ Yogesh Prasad