InterviewSolution
Saved Bookmarks
| 1. |
Which of this access specifies can be used for a class so that its members can be accessed by a different class in the same package?(a) Public(b) Protected(c) No Modifier(d) All of the mentionedI got this question during a job interview.The question is from Packages in chapter Interfaces & Packages of Java |
|
Answer» CORRECT option is (d) All of the mentioned For explanation: EITHER we can use PUBLIC, protected or we can NAME the CLASS without any specifier. |
|