SCJP 6.0 (86%) SCWCD 5 (94%)
SCJP 1.6 96%
SCJP 6.0 (86%) SCWCD 5 (94%)
Guilherme Borges Lima wrote:
...... s1.toUpperCase returns a String that is not in the String pool, because it is not a literal.
Yes, the Object that contains "APPLE" is eligible to GC.
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Yea, That APPLE is eligible GC. It also is in the String Literal Pool(obviously it is a String literal??), since it doesn't have any reference in the stack, that's why it is eligible for GC. Correct?
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
SCJP 1.6 96%
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Can anyone explain me how 13 objects are created. I thought just 9 objects are created.
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
KrishnaPrasad raghavan wrote:Can anyone explain me how 13 objects are created. I thought just 9 objects are created.
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Can anyone explain me how 13 objects are created. I thought just 9 objects are created.
The 13 objects that are created are as follows (wherever I've written (CP), it means that the object was created in the String constant pool) ......///////
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Abimaran Kugathasan wrote:I think, you won't help me. But you did it.
But can you give a good explanation for us about that question I asked lastly.???
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
SCJP 6.0 (86%) SCWCD 5 (94%)
It will give me the powers of the gods. Not bad for a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|