Programming Tutorials

Explain the Encapsulation principle.

By: Karthik in Interview Tutorials on 2012-06-16  

Answer: Encapsulation is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper.





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Interview )

What is transient variable?

What is the difference between interface and abstract class?

Interview Question: Do ActionForms have to be true JavaBeans?

What are the call back methods in Session bean?

What is the difference between Session Bean and Entity Bean?

Interview Question: What is the difference between sessioncontext and entitycontext?

Question: What is an Expression tag in JSP?

Interview Question: What is EJB container?

Explain the Encapsulation principle.

Interview Question: What is Local client view in EJB?

What is difference between Java Bean and Enterprise Java Bean?

What is similarities/difference between an Abstract class and Interface?

What is bean managed transaction?

Interview Question: What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

Interview Question: What is the difference between EAR, JAR and WAR file?

Latest Articles (in Interview)