technology Online Quiz - 1834
Casual Mode - Take your time!
1 / 20
Correct
0
Incorrect
0
Score
0%
Multiple Choice
Given: 1. package geometry; 2. public class Hypotenuse { 3. public InnerTriangle it = new InnerTriangle(); 4. class InnerTriangle { 5. public int base; 6. public int height; 7. } Which statement is true about the class of an object that can reference the variable base?
- It can be any class
- No class has access to base
- The class must belong to the geometry package
- The class must be a subclass of the class Hypotenuse