Consider the java code below. The output which i got is written after the //
class test
{
public static void main(String[] args)
{
int x=10;
System.out.println("X="+10 == "X="+10); // TRUE
System.out.println("X="+x == "X="+x); // FALSE
}
}
In both the lines String concatenation is going to happen but how the output is different?