This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Few queries on Chapter 3 of SCJP 5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Few queries on Chapter 3 of SCJP 5" Watch "Few queries on Chapter 3 of SCJP 5" New topic
Author

Few queries on Chapter 3 of SCJP 5

deepu verma
Greenhorn

Joined: Sep 19, 2006
Posts: 1
Following are my queries with reference to Chapter 3 of SCJP 5

1. In the self test of Chapter 3 Question no 2
Should the answer not be 4 objects, since the line Cardboard c3 = c1.go(c2) would also set the c3 object to null.

2. Should the function rt.freeMemory() be rt.getFreeMemory()

Thanks
Deepak

On Page 234 of the book there is a typo System.out.println("y=" + i); should be System.out.println("y=" + y);
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

Hi. Have a look at the Errata for this book here...

http://www.coderanch.com/t/257589/java-programmer-SCJP/certification/SCJP-Errata-Updated


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Jacky Zhang
Greenhorn

Joined: Sep 17, 2006
Posts: 18
Originally posted by deepu verma:

1. In the self test of Chapter 3 Question no 2
Should the answer not be 4 objects, since the line Cardboard c3 = c1.go(c2) would also set the c3 object to null.


no, because c3 is just a reference variable in the stack, no object has ever been created for it to point to in the heap, hence nothing to be GCed.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Few queries on Chapter 3 of SCJP 5
 
Similar Threads
Doubt in K&B SCJP 5: Chap 2, SELF TEST, Q 11
What exactly is in the SCJP exam?
SCJP
SCJP Mock Question : static
K&B Book for Scjp 6 - Chapter 5 question 8 doubt