• 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

Classes

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ALl,
This is from the IBM Mock test. An answer along with an explantion is requested.
Which the following are legal for the top level class FROG ?
1. protected class Frog extends Animal
2. private class Frog extends Animal
3. transient class Frog extends Animal
4. native class Frog extends Animal
Thx
Aruna
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Aruna,
As I know, top level classes may not be private,protected. transient is applicable only for variables.
native is applicable only for functions ( to call a fn. of like c/c++).
So none of the answers are correct.

Originally posted by Aru:
Hi ALl,
This is from the IBM Mock test. An answer along with an explantion is requested.
Which the following are legal for the top level class FROG ?
1. protected class Frog extends Animal
2. private class Frog extends Animal
3. transient class Frog extends Animal
4. native class Frog extends Animal
Thx
Aruna


 
Aru
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Chitra,
Thanks for ur explanation, That was the same thing what I thought too. But what to answer if such question is posed in the SCJP ? Should a answer be selected or can it be left blank....
Confused.
Aruna.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On the real exam (but not IBM's apparently), there will always be at least one correct answer. So if you can't find one, keep looking.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic