PRO192_-_SP_2023_-_BL5_-_FE_118.webp
hoangduc2001

PRO192_-_SP_2023_-_BL5_-_FE_118.webp

Multiple Choices
(Choose 1 answer)
The following lists the complete contents of the file named Derived.java:
1. public class Base extends Object {
23 3 String objType;. public Base(){objType =
"I am a Base type";}
4567 4.5.)6.
7. public class Derived extends Base {
8. public Derived() { objType = "I am a Derived type";
9. }
10. public static void main(String args[]){
11.Derived D = new Derived();
12. }
13.}
What will happen when this file is compiled?
A. Two class files, Base.class and Derived.class, will be created.
B. The compiler will object to line 1.
C. The compiler will object to line 7.
  • Like
Reactions: phanhiungo

Thông tin

Category
PRO192
Thêm bởi
hoangduc2001
Ngày thêm
Lượt xem
2,239
Lượt bình luận
17
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom