How many objects are created by using the Integer wrapper class?

Viewed 4421
Integer i = 3; 
i = i + 1; 
Integer j = i; 
j = i + j; 

How many objects are created as a result of the statements in the sample code above and why? Is there any IDE in which we can see how many objects are created (maybe in a debug mode)?

5 Answers
Related