Why is private variable used in Java Programming ?
A
Chance of reducing used in Java Programminers
B
Data loss prevention
C
polymorphhism
D
All of the above
Correct Answer: All of the above
Making members private in Java is one of the best coding practice, private method are well encapsulated in class. IDE like Netbeans and Eclipse use this information and automatically check whether private methods are used inside the class or not and can display relevant warning to improve code quality.