What is meant by Encapsulation? Can you write a class to
explain encapsulation?
Answer Posted / srinivasa
All the javabeans written in java follows encapsulation.
In java bean variables are declared as private for
security. will be accessed using setter and getter method.
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Why is an interface be able to extend more than one interface but a class can’t extend more than one class?
Will minecraft java be discontinued?
Explain the difference between runnable and callable interface in java?
How do you square a number in java?
How will you serialize a singleton class without violating singleton pattern?
Which of the classes will have more memory allocated?
Explain the overview of UDP messaging.
What is port number in java?
What is thread life cycle?
Can we override private methods?
What is function overriding and overloading in java?
What is the benefit of using enum to declare a constant?
What is the difference between static class and normal class?
What is the use of pattern in java?
What is the importance of static variable?