PRO192_-_SU_2025_-_Quiz_-_SL4_3927.webp
Hữu Vinh

PRO192_-_SU_2025_-_Quiz_-_SL4_3927.webp

Question 8
Not yet
answered
Flag question
Which statement is true about the following code?
abstract class Vehicle {
abstract void start();
}
class Car extends Vehicle {
void start() {
System.out.println("Car starts");
}
}
public class Main {
public static void main(String[] args) {
Vehicle v = new Car();
v.start();
}
a.
Car starts will be printed.
O b. The program will compile but not print anything.
c. The program will compile but throw a runtime exception.
O d. Vehicle v = new Car(); will cause a compilation error.

Thông tin

Category
PRO192
Thêm bởi
Hữu Vinh
Ngày thêm
Lượt xem
387
Lượt bình luận
3
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom