PRO192_-_FA_2023_-_FE_1027.webp
Erza_girl

PRO192_-_FA_2023_-_FE_1027.webp

37
Answer (Choose 1 answer)
A. Compilation error in line (1)
B. Compilation error in line (3)
C. Compilation error in line (2)
D. 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) {
Eating e=new Meal() { // (2)
@Override
public int getMeals() {
return 3;
}
};e.getHour();// (3)

Thông tin

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

Image metadata

Filename
PRO192_-_FA_2023_-_FE_1027.webp
File size
55.6 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom