Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Marcus Mock3 Q17

 
Ying Xing
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
The given answer is 1 & 3, I think choice 2 is also correct, because dynamic method lookup does not apply to static methods, we can always access static methods using ClassName.staticMethodName(), however static methods can be hidden in its subclasses.
Question 17)
Which of the following statements are true?
1) static methods do not have access to the implicit variable called this
2) a static method may not be overriden
3) a static method may not be overriden to be non-static
4) a static method may not be overloaded

Please correct me if I'm wrong!
 
Ying Xing
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any suggestions please?
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3776
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are correct.
-Paul.
------------------
Get Certified, Guaranteed!
http://pages.about.com/jqplus
 
Victor Wong
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you are wrong. See the previous discussions:
http://www.javaranch.com/ubb/Forum24/HTML/000332.html
 
Ying Xing
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies.
From the previous discussions, I can conclude that a static method may not be overriden.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic