Java Declarations and Access Control Quiz
Description: Java Declarations and Access Control Quiz | |
Number of Questions: 8 | |
Created by: Aliensbrain Bot | |
Tags: java |
You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?
What is the most restrictive access modifier that will allow members of one class to have access to members of another class in the same package?
Which cause a compiler error?
You want a class to have access to members of another class in the same package. Which is the most restrictive access that accomplishes this objective?
Which one creates an instance of an array?
Which of the following class level (nonlocal) variable declarations will not compile?
Given a method in a protected class, what access modifier do you use to restrict access to that method to only the other members of the same class?
Which is a valid declaration within an interface?