== is also used for comparing the values of primitives. The equals method cannot be used directly on primitives (They must be wrapped).
int a = 5;
int b = 5;
if(a == b)
{
...
Type: Posts; User: helloworld922
== is also used for comparing the values of primitives. The equals method cannot be used directly on primitives (They must be wrapped).
int a = 5;
int b = 5;
if(a == b)
{
...