Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
kaushik vira
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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??/
     
    Venkata Saraswathi
    Ranch Hand
    Posts: 55
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I hope you can use private. Because private methods has class scope.

    --
    Venkata.
     
    kaushik vira
    Ranch Hand
    Posts: 102
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Can any one having more detail Answer..
     
    Alexander Danilou
    Greenhorn
    Posts: 28
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 102
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    hello Alexander ,

    Thanks for you efforts.. but in Inquisition simulator it`s like this only.. i am also confused
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic