• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Marcus Mock3 Q17

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any suggestions please?
 
Enthuware Software Support
Posts: 4897
60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are correct.
-Paul.
------------------
Get Certified, Guaranteed!
http://pages.about.com/jqplus
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the replies.
From the previous discussions, I can conclude that a static method may not be overriden.
 
Paper jam tastes about as you would expect. Try some on this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic