Question
1) Door is an abstract class. SlidingGlassDoor extends Door. HingedDoor extends Door. AutomaticDoor extends Door. Which of the following lines of code contains an error?
1)
Door is an abstract class. SlidingGlassDoor extends Door. HingedDoor extends Door. AutomaticDoor extends Door. Which of the following lines of code contains an error?
Question 1 options:
| Door door = new Door(); |
| Door[] doors = {new SlidingGlassDoor(), new HingedDoor()}; |
| AutomaticDoor door = new AutomaticDoor(); |
| Door door = new SlidingGlassDoor(); |
2)
public int absoluteValue(int x){ ... } public double absoluteValue(double x){ ... } public float absoluteValue(float x){ ... } The above methods represent an example of
Question 2 options:
| overloading |
| inheritance |
| synonyms |
| overriding |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started