Created
October 3, 2022 21:12
-
-
Save rmg007/8620d9c36482bd9f487fddef9566ecd3 to your computer and use it in GitHub Desktop.
learn and dive deep Java Course. Assignment Operators lecture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
/* | |
= , +=, -=, /=, *= | |
*/ | |
public static void main(String[] args) { | |
int x = 6; | |
x += 2; // x = x + 2; | |
System.out.println(x); | |
int n = 6; | |
n /= 2; // n = n / 2 | |
System.out.println(n); | |
int a = 2; | |
a *= 2; // a = a * 2; | |
System.out.println(a); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment