PRO192_-_FA_2023_-_FE_1027.webp
Erza_girl

PRO192_-_FA_2023_-_FE_1027.webp

(33)
Answer (Choose 1 answer)
A. The compiler will complain that the Base class is not declared as abstract.
B. The code will compile and run, printing out the words "My Func"
C. The code will compile but complain at run time that the Base class has non abstract methods
D. The compiler will complain that the method myfunc in the base class has no body
}
}


class Base
What will happen when you attempt to compile and run this code?
abstract public void myfunc();
public void another(){System.out.println("Another method");}
public class Abs extends Base{
public static void main(String argv[]){
Abs a = new Abs();
a.amethod();
}
public void myfunc(){
System.out.println("My func");}
public void amethod(){myfunc();}

Thông tin

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

Image metadata

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

Share this media

Back
Bên trên Bottom