PRO192_-_S6_-_FA_2023_-_FE_1038.webp
V

PRO192_-_S6_-_FA_2023_-_FE_1038.webp

(Choose 1 answer)
class Base{
public final void amethod(){
What will happen when you attempt to compile and run this code?
System.out.println("amethod");
}
}
A. Compile time error indicating that a class with any final methods must be declared final itself
B. Run time error indicating that Base is not defined as final
public class Fin extends Base{
public static void main(String argv[]){
Base b = new Base();b.amethod();
}
}
C. Success in compilation and output of "amethod" at run time.
D. Compile time error indicating that you cannot inherit from a class with final methods


Exit 19

Thông tin

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

Image metadata

Filename
PRO192_-_S6_-_FA_2023_-_FE_1038.webp
File size
57.3 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom