IntelliJ open source
[Logo] JavaRanch » JavaRanch Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Win a copy of JBoss AS 5 Development this week in the JBoss forum
or Spring Dynamic Modules in Action in the Spring forum!
Reply Bookmark it! Watch this topic JavaRanch » Forums » Professional Certification » Programmer Certification (SCJP)
 
RSS feed
 
New topic
Author

Inquisition [0.14]- Exam Question - Requried Correct Answer. - overriding in static members.

kaushik vira
Ranch Hand

Joined: Feb 01, 2007
Messages: 101



What class modifier(s) can be inserted at line 1 to prevent method() from being overridden (hidden ) without causing compile time errors ?

options are:-

  • transient
  • private
  • default
  • protected
  • hiding cannot be prevented
  • final


  • As per me there is no overriding in picture, as method is static.. so Answer should be hiding cannot be prevented. but simulator ans is Private
    Can any buddy explain.. how??/

    kaushik Vira
    -------------------------------------
    SCJP, Preparing SCWCD..
    Venkata Saraswathi
    Ranch Hand

    Joined: Sep 27, 2008
    Messages: 55

    I hope you can use private. Because private methods has class scope.

    --
    Venkata.
    kaushik vira
    Ranch Hand

    Joined: Feb 01, 2007
    Messages: 101

    Can any one having more detail Answer..

    kaushik Vira
    -------------------------------------
    SCJP, Preparing SCWCD..
    Alexander Danilou
    Greenhorn

    Joined: May 08, 2009
    Messages: 28

    All I can add that private final is also going to be correct combination to add on line 1. It is not clear from the answer if we should chose one or several. To me this question is also unclear...
    kaushik vira
    Ranch Hand

    Joined: Feb 01, 2007
    Messages: 101

    hello Alexander ,

    Thanks for you efforts.. but in Inquisition simulator it`s like this only.. i am also confused

    kaushik Vira
    -------------------------------------
    SCJP, Preparing SCWCD..
     
     
     
    Reply Bookmark it! Watch this topic JavaRanch » Forums » Professional Certification » Programmer Certification (SCJP)
     
    RSS feed
     
    New topic
    aspose coverage