Decrement In JAVA
DECREMENT IN JAVA Hello Geeks!!! OVERVIEW :- Decrement : Decrement Is Change In Value Of The Variable. It Is The Substraction Of -1 to The Variable. Two Types Of Decrement : Pre-Decrement Post-Decrement Pre-Decrement : It Is The Change Of Value Before The Execution. SYNTAX- ++variable. Post- Decrement : It Is The Change Of Value After The Execution. SYNTAX- variable++ PROGRAM :- // Decrement In Java public class Decrement { public static void main (String args[ ]) { int a=5,b=10; a= --a ; //Pre- Decrement b= b-- ; //Post- Decrement System.out.println ("A = "+a); System.out.println ("B = "+b); } } OUTPUT :- TEST YOURSELF :- QUES -- WRITE A JAV...