Private,Public and Protected in Java

210 views · Published 28 January 2014 · 2:14 · Indexed 25 September 2026

Channel: Interview DOT · 2014 · Science & Technology

Watch on YouTube

Click here - https://www.youtube.com/channel/UCd0U_xlQxdZynq09knDszXA?sub_confirmation=1 to get notifications. Private,Public and Protected in Java -   Java Interview Question And Answer

A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-resume/uploadresume.htm

Are you looking for a new Job ?
InterviewDot.com - A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-resume/uploadresume.htm

Short  Java Interview Question And Answer ?

1. Difference between Private , Public and Protected ?

Private - Not accessible outside object scope. Public - Accessible outside object scope. Protected - Becomes private when inherited.

2. What is role of Synchronization in Java ?

Managing exclusive access of the code block to single thread at a time to maintain its integrity.

3. What is Default Access ?

Accessible only by the objects in the same package.

4. Difference between Vector and ArrayList ?

Vectors are synchronized whereas Array lists are not synchrionized.

5. Difference between class and objects ?

Class is a template using which objects are created in memory or instances of a class.


Private,Public and Protected in Java

More from this channel