Equality Operators in Java


Use == and != to check equality and inequality respectively.

Source Code

int a = 5;
int b = 3;
System.out.println(a == b); // Equality check - false
System.out.println(a != b); // Inequality check - true
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments