by John Stone
I can see only two new String objects created:
by Jim Yingst
...correct version of this question used the following declaration for process():
public static <E extends Number> List<E> process(List<E> nums) {
by swarna,
...how many String objects and how many reference variables were created prior to the println statement?
Posted by swarna
Regarding
System.out.println( s1 + � and � + s3 ) ;
" and " will surely be created in the string pool.
I do assume that �abc and � and �abc and xyz� would be created because of left associativity and since one of them is a reference, they would be created on the heap.