• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

mock question

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
select the true statement
source testcafe
a) transient method cannot be overridden
b) A final class may not be subclass
c) a private method can never be overridden to become public
d) a final method may not be overridden
ans is b and d

I have a doubt between may and always
thanks in advance
 
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi V Gala


Even i got confused after reading

A final class may not be subclassed

but what actualy is.........

final class alaways cannot
be subclassed right isnt it?




then it leads to some meaning isnt it?

May be it sounds different but leads to
something meaningful................

I hope it helps.........!!!





Preparing SCJP 1.5
 
V Gala
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Final class cannot be subclass

why option 3 is false
 
Ranch Hand
Posts: 274
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by V Gala:
Final class cannot be subclass

why option 3 is false



Option 3: "a private method can never be overridden to become public"

is false because the private methods are not visible in a child class, so if something is not visible you cannot override it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic