首页 相关文章 Test of the Java Skill(1)

Test of the Java Skill(1)


     Question 1:
     What will happen when you attempt to compile and run this code?
     class Base{
     public final void amethod(){
     System.out.println(“amethod”);
     }
     }
  
     public class Fin extends Base{
     public static void main(String argv[]){
     Base b = new Base();
     b.amethod();
     }
     }
  
     A. Compile time error indicating that a class with any final methods must be declared final itself
  
     B. Compile tim...[ 查看全文 ]

2016-02-19 标签:

Test of the Java Skill(1)的相关文章

手机页面
收藏网站 回到头部