Java using Increment operator

Java increment operator on 13/09/2021
//Java using increment operator
public class Main
{
	public static void main(String[] args) {
	    int a=10;
	    int b=20;
	    int c,d;
	    c=b++;
	    d=++a;
	    c++;
		System.out.println("a ="+a);
		System.out.println("b ="+b);
	    System.out.println("c ="+c);
	    System.out.println("d ="+d);
	    
	}
}
a =11
b =21
c =21
d =11


...Program finished with exit code 0
Press ENTER to exit console.

Comments

Popular posts from this blog

Speech Emotion Recogination