更多java基础知识试题
- 1已知如下代码:1 class Example{2 String str;3 public Example(){4 str= "example";5 }6 public Example(String s){7 str=s;8 }9 }10 class Demo extends Example{11 }12 public class Test{13 public void f (){14 Example ex = new Example("Good");15 Demo d = new Demo("Good"); } }哪句语句会导致错误?
- 2TextField的事件监听器接口是( )。
- 3下列目录中,哪一个是用来存放JDK核心源代码的?( )
- 4return语句( )
- 5java语言在语言的类型上应属于那种类型的语言 ( )