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
0 comments:
Post a Comment