-->
当前位置:首页 > 题库 > 正文内容

FILL_IN_THE_BLANK:Read the following program and write the output.

Luz3年前 (2021-05-10)题库314
Read the following program and write the output.
```
public class AppleMobilePhone extends MobilePhone{
public static void main(String[] args){
new AppleMobilePhone();
}
public AppleMobilePhone(){
System.out.println("This is a Applemobilephone");
}
}
class MobilePhone extends Phone{
public MobilePhone(){
System.out.println("This is a mobilephone");
}
}
class Phone{
public Phone(){
System.out.println("This is a phone");
}
}
```
Output after program running:
Choose from the following options and fill in the blanks with the corresponding number (1, 2 or 3)
(1)This is a phone
(2)This is a Apple mobile phone
(3)This is a mobile phone
First line output: @ @ [1] (2)
Second line output: @ @ [3] (2)
Third line output: @ @ [2] (2)







answer:Empty 1: 1||
Empty 2: 3||
Empty 3: 2||

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。