my dog learned polymorphism*
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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: 8043
    
  22

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?
Articles by Winston can be found here
Ishan Pandya
Ranch Hand

Joined: Feb 06, 2012
Posts: 223

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


OCPJP
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8043
    
  22

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