PRO192_-_SU_2023_-_Block_5_-_FE_735.webp
successful_man

PRO192_-_SU_2023_-_Block_5_-_FE_735.webp

(45)
Answer (Choose 1 answer)
A. 3
B. Compilation error in line (2)
C. Compilation error in line (1)
D. Compilation error in line (3)
}
What will be the output of following code?
interface Eating{
public void getHour();public int getMeals();}
abstract class Meal implements Eating{ // (1)
public void getHour(){
System.out.println(getMeals());
}
} public class Main1 {
public static void main(String[] args) { (2)
e=new @Override
public int getMeals() {
return 3;
}
};
e.getHour();// (3)

Thông tin

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

Image metadata

Filename
PRO192_-_SU_2023_-_Block_5_-_FE_735.webp
File size
54.6 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom