• 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

worded questions...

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While I was doing Jxam exam, I got comfused by the right answers for some basic theory what I thought I have cleared them totally.
For ex.
1. Every class that you create in java is automatically supplied an non-argument constructor by the object class.
True. Every class?? including those have their constructors created within the class? I thought, JVM checks the class first, then decide whether creating a default constructor or not.
2. a subclass can access all the properties and attributes of the base calss.
True. then how about private variables? does it mean, access directly and indirectly.....
Am I too picky? please correct me.
Indy
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

My choice would be
1. FALSE.
Due to the fact that the given choice mentions
"Every" and does not have a phrase which says "which has
no constructor."
2. FALSE.
What about the protected/package access difference. We know
that friendly classes donot allow access to variables
(propeties) of super class from a sub-class. (This is allowed
for protected variables).
I hope I am right.
Regds.
- satya
 
Indy
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with you, satya. However, the test is random questions, I have to run it at home by the night. I will try to double check the question and answer. Anyway, I will stick with both flase.
Thank you.
Indy
 
No thanks. We have all the government we need. This tiny ad would like you to leave now:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic