Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Late Objects
Quiz 9: Inheritance and Interfaces
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 41
Multiple Choice
Consider the following class hierarchy: Public class Vehicle { Private String type; Public Vehicle(String type) { This.type = type; } Public String getType() { Return type; } } Public class LandVehicle extends Vehicle { Public LandVehicle(String type) { ) . . } } Public class Auto extends LandVehicle { Public Auto(String type) { ) . . } } Which of the following code fragments is NOT valid in Java?
Question 42
Multiple Choice
Consider the following code snippet: Public abstract class Employee { Public abstract void setSalary() ; ) . . } You wish to create a subclass named Programmer. Which of the following is the correct way to declare this subclass?