Interview Question

Consultant Interview Fairfax, VA

What is the difference between private and protected in

  Java ?
Tags:
java
Answer

Interview Answer

1 Answer

0

Private variables cannot be accessed from outside the class. Protected variables can be accessed from classes that inherit them.

Interview Candidate on Jul 22, 2010

Add Answers or Comments

To comment on this Question, Sign In with Facebook or Sign Up