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

What is loop in java?

777


Why is singleton instance static?

755


Is void a return type?

751


What is the basic concepts of OOPS?

940


What do you mean by constant time complexity?

850


What is the difference between comparison done by equals method and == operator?

804


What is object cloning in Java?

875


Why are global variables used?

734


Why vector class is used?

739


What are the differences between include directive and include action?

787


When the constructor of a class is invoked?

788


Why does it take so much time to access an applet having swing components the first time?

1699


What is a class in java?

805


Why bytecode is called bytecode?

834


What is the purpose of a parameter?

795