File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Encapsulation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Encapsulation" Watch "Encapsulation" New topic
Author

Encapsulation

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 172
Hello Everyone
Well, i have just under gone an interview in which i was asked this question :

Que . Which class in java is purely encapsulated ?

I answered "Bean class"..was i right ? If not what is the right answer ?

Thanks!!!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38087
    
  22
No, that is not the right answer. The right answer is to spend 30″ explaining what encapsulation means, and then giving a concrete example. It might be a good idea to give a counter‑example, e.g. java.awt.Point. A single word is hardly ever the right answer in an interview.
Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 172
Campbell Ritchie wrote:No, that is not the right answer. The right answer is to spend 30″ explaining what encapsulation means, and then giving a concrete example. It might be a good idea to give a counter‑example, e.g. java.awt.Point. A single word is hardly ever the right answer in an interview.


Thanks C. Ritchie
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38087
    
  22
You're welcome
 
Don't get me started about those stupid light bulbs.
 
subject: Encapsulation
 
Similar Threads
What is Encapsulation
Encapsulation ?
Encapsulation
Encapsulation
doubt on uCertify question