• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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??/
     
    Ranch Hand
    Posts: 55
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Can any one having more detail Answer..
     
    Greenhorn
    Posts: 28
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    hello Alexander ,

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