File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes problem in multiple choice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "problem in multiple choice" Watch "problem in multiple choice" New topic
Author

problem in multiple choice

Saumyaraj Zala
Ranch Hand

Joined: Aug 06, 2012
Posts: 56



The output shoul be xycg but how could it be cxgy and xygc??


Why do we fall? So that we can learn to pick ourselves up.
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7064
    
  16

saumyaraj zala wrote:The output shoul be xycg but how could it be cxgy and xygc??

Well my advice to you is to format that class with proper indenting. Then you may be able to see how.

Right now it's a mess - even if it came that way from an SCJP book (they do it that way on purpose) - and it's preventing you from seeing how the class is structured.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here
Ishan Pandya
Ranch Hand

Joined: Feb 06, 2012
Posts: 213

[Moderator action] Removed "complete" solution. please see comment below.


OCPJP
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7064
    
  16

Ishan Pandya wrote:"X"-static block is always called first...

Ishan, I'm sure you're intentions are good, but we try not to just hand out answers here - particularly in the "Beginning Java" forum.

Please look at the guidelines on the HowToAnswerQuestionsOnJavaRanch (←click) page.

Winston
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in multiple choice
 
Similar Threads
Inner Classes
static class question
What is the sequence of execution?
K&B chapter 8 Self Test Q 8
casting error