what is encapsulation in java? Explain
Answer / Laxmi
Encapsulation in Java is the mechanism of hiding internal implementation details (attributes or methods) of an object and exposing only the necessary public interfaces. It helps to prevent data from being accessed directly by other classes, enhances code reusability, improves modularity, and provides a strong access control mechanism.
| Is This Answer Correct ? | 0 Yes | 0 No |
How do you do absolute value in java?
How does system arraycopy work in java?
Explain Connection Pooling?
What are the differences between string, stringbuffer and stringbuilder?
What is the purpose of finalization in java programming?
How are variables stored?
Why do we use return statement?
What is the difference between Access Modifier and Access specifier?
What is meant by nested loop?
What do you mean by scope of variable?
What do the thread?class methods run() and start() do?
Why singleton pattern is better than creating singleton class with static instance?