Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package decrement;
- public class Decrement {
- public static void main(String[] args) {
- int a = 10;
- System.out.println("Pre-Decrement");
- System.out.println("a = "+a);
- System.out.println("--a = "+ --a);
- System.out.println("a = "+a);
- int b = 10;
- System.out.println("Post-Decrement");
- System.out.println("b = "+b);
- System.out.println("b-- = "+ b--);
- System.out.println("b = "+b);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment