File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes K & B-Self test Ch 03 question no $ Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "K & B-Self test Ch 03 question no $" Watch "K & B-Self test Ch 03 question no $" New topic
Author

K & B-Self test Ch 03 question no $

kiruthigha rajan
Ranch Hand

Joined: Dec 29, 2011
Posts: 69

What is the result?
A. hi
B. hi hi
C. hi hi hi
D. Compilation fails
E. hi, followed by an exception
F. hi hi, followed by an exception

The answer given is F.
Line1 is Executed an object is created.
Line2 is executed m2 is passed to m and not m1 and m2 are pointing to same object.
Line3 Hi gets printed
Line4 points m3.m1 what is the meaning of this?? is this means m1 instance variable of m3 object which means the instance variable in m2(since both m1 and m2 are pointing the same object)???
Line6 points m2.m1 what does this mean?
?
anyone help me out this mess..i surfed many posts posted before but i didnt get the point..
thanks in advance
saloni jhanwar
Ranch Hand

Joined: Feb 09, 2012
Posts: 583

Use search option to quickly get answers like this.


Tell the difficulties that i am difficult.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: K & B-Self test Ch 03 question no $
 
Similar Threads
Explanation for output
Please Explain
Clarification on Q6 Self-Test Chapter 3 K&B SCJP5
output not clear
initialization