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

PRO192_-_SU_2025_-_Quiz_-_SL4_3927.webp

Question 5
Not yet
answered
Flag question
Examine the following Java code:
abstract class Shape {
abstract void draw();
}
class Circle extends Shape {
void draw() {
System.out.println("Drawing Circle");
}
}
class Test {
public static void main(String[] args) {
}
Shape shape = new Circle();
shape.draw();
}
What concept of OOP is demonstrated by this code snippet?
a. Encapsulation
b. Polymorphism
c. Inheritance
d. Composition

Thông tin

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

Share this media

Back
Bên trên Bottom