Hi ALL,
Here I wrote a program for Magic between Increment and Decrement operators in java.
/**
*
* @author Balamurgan
M
*/
public class incerment {
public static void
main(String arg[]){
int i=10;
int x=10 *
i++;
System.out.println("i value
" +i+ " x value "+x);
int y=10;
x=10 * ++y;
System.out.println("y value "+ y +" x value "+x);
System.out.println("Decrement operation ");
int z=10;
x=10 * z--;
System.out.println("Z value "+
z +" x value "+x);
int j=10;
x=10 * --j;
System.out.println("Z value "+ z +" x value "+x);
i=10;
int k=i++ +1;
System.out.println("K value "+k);
}
}
No comments:
Post a Comment