What is meant by Encapsulation? Can you write a class to
explain encapsulation?

Answer Posted / ajay kumar sharma

Wraping of objects under a class is known as Encapsulation.

class
{
public static void main(String a[])
{
int a,b,
....
....
}
}

Is This Answer Correct ?    2 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a static method be final?

774


What is the purpose of default constructor?

782


What is singleton class example?

790


How many types of parsers are there?

786


Can we synchronize static methods in java?

806


What is the size of int?

847


What is remote method invocation (rmi)?

814


Java is pass by value or pass by reference? Explain

768


Which data type is class in java?

771


Tell some latest versions in JAVA related areas?

768


What is thread start?

722


What is java jit compilers?

759


What access modifiers can be used for class ?

772


How many bits is a string?

747


What is treeset in java collection?

755