Computer Science, asked by balusuteja1234, 5 hours ago


Integer x1 = new Integer(120);
int x2 = 120;
System.out.println( x1 == x2);

Answers

Answered by aniketsingh0305
2

Answer:

true

Explanation:

Answered by friendmahi89
0

False.

The given code is,

Integer x1 = new Integer(120);

int x2 = 120;

System.out.println( x1 == x2);

Output of the above code will be false because here two new Objects will be made. Due to the invocation of the new operator and the creation of the second object by auto-boxing, the first object that X is pointing at will be produced.

​In Java, an object is both a conceptual and physical entity. An object is an entity with state and behavior, such as a chair, bike, marker, pen, table, or car. It could be intellectual or physical (tangible and intangible).

Learn more about object

https://brainly.in/question/2998212

Object

https://brainly.in/question/16040398

#SPJ2

Similar questions