SCJP Garbage Collection
SCJP Garbage Collection
QUESTION : 1
1. 0
2. -256
3. 127
4. -127
5. -1
ANS : 2
QUESTION : 2
1. 32
2. 12
3. 8
4. 24
5. 128
6. 0
ANS : 5
QUESTION : 3
1. 0
2. 1
3. 2
4. 3
ANS : 1
QUESTION : 4
1. Yes
2. No
ANS : 1
QUESTION : 5
True or False.
The garbage collector is required to makes sure that all objects
held by soft references are garbage collected before the VM throws
an OutOfMemoryError.
1. True
2. False
ANS : 1
QUESTION : 6
ANS : 3
QUESTION : 7
1. 0
2. 4
3. 6
4. 8
5. 12
ANS : 5
QUESTION : 8
1. 1
2. 8
3. -8
4. 0
5. 16
ANS : 3
QUESTION : 9
Is this legal ?
1. No.
2. Yes.
ANS : 2
QUESTION : 10
1.int i = (int)16.2d;
2. byte b = (byte)(long)16.2;
3. byte b = 128;
4. float f = 16.2;
5. byte b = (int)16.2;
ANS : 1,2,5