Shifting:
I know that 128 >>> 1 equals 64. How about 128 >> 1? Is it 64 or -64? Why?
Garbage Collection:
When is the
string object created in line2 first subjected to Garbage Collection?
1 public void aMethod(){
2 String s1 = "Hello";
3 String s2 = "pal";
4 s1 = s1 + s2;
5 System.out.println(s1);
6 }
The answer is "after line 4". Why not after line 6?
Thank you.