Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Rules Round Up game  RSS feed

 
Wael Aoudi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im not sure where exactly i should post this..but i was using the rules round up game and it sort if has a glitch. When it presented Q. 109 all it shows was the question and a done button.. no choices for answers. and the done button was a dead button. anyways I really enjoy this website.. it has helped me alot as i am preparing for the SCJP 1.4 exam( which im taking in 12hrs)..
thanks again
-wael
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you talking about the original Rule Roundup Game or the new improved Rule Roundup Game?
[ March 10, 2004: Message edited by: Marilyn de Queiroz ]
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
New rules roundup Q20:
"can a private method of a superclass be declared in a subclass".
Answer according to the game is "yes", should be "no".
The method can be redeclared, not declared.
 
Aneesha Singh
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeroen,
I think the game is right .. the method can be declared .. but its not inherited
I think the answer is fine!
Cheers!
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Aneesha Singh:
Hi Jeroen,
I think the game is right .. the method can be declared .. but its not inherited
I think the answer is fine!
Cheers!

No, it can be redeclared, not declared (as it's declared already in the parent class).
Question says it's a trick question, that alone means paying attention to the smallest detail in wording
 
paul wheaton
Trailboss
Posts: 22521
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exam is just that picky.
If all else fails, run it through the compiler. I think in this case, the compiler will show that the question is correct.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not talking about whether the code will compile, but whether the wording of the question and the answer are in sync
I know the exam is picky, that's why I'm trying to get in the right mindset for it
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The wording is fine. Nothing in the JLS or any book I'm aware of supports distinguishing between "declared" and "redeclared". I would argue that "declared" would be more correct anyway; you're actually declaring a new, different method which happens to have the same name as a previous method. But it's not actually related to the other method in any meaningful way.
 
Aneesha Singh
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Jim. Its declared. How can it be considered 'redeclared' if the class is not even aware of it? The subclass declaring the method is not aware of the superclass method, so it declares it, I would argue .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!