aspose 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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Encapsulation" Watch "Encapsulation" New topic
Author

Encapsulation

Tarun Oohri
Ranch Hand

Joined: Feb 20, 2013
Posts: 180
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: 40052
    
  28
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: 180
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: 40052
    
  28
You're welcome
 
 
subject: Encapsulation