【单选题】【消耗次数:1】
下面哪一行代码正确的声明了一个类方法(静态方法)?( )
public int method(int i)
protected method(int i)
public static method(String s)
protected static void method(Integer i)
参考答案:
复制
纠错
相关题目
【单选题】 下面哪个函数是public void method(){ }的重载函数?( )
①  public void method( int m){ }
②  public int method(){ }
③  public void method2(){ }
④  public int method(int m,float f ){ }
【单选题】 已知有下面类的说明: public class X5_1_1 extends x{ private float f =10.6f; int i=16; static int si=10; public static void main(String[] args) { X5_1_1 x=new } } X5_1_1(); 在 main()方法中,下面哪条语句的用法是正确的?( )
①  x.f
②  this.si
③  X5_1_1.i
④  X5_1_1.f
【单选题】 运行下面程序时,会产生什么异常?( ) public class X7_1_4 { public static void main(String[] args) { int x = 0; int y = 5/x; int[] z = { 1,2,3,4 } ; int p = z[4]; } }
①  ArithmeticException
②  NumberFormatException
③  ArrayIndexOutOfBoundsException
④  IOException
【单选题】 运行下面程序时,会产生什么异常?( ) public class X7_1_5 { public static void main(String[] args) { int[] z = { 1,2,3,4 } ; int p = z[4]; int x = 0; int y = 5/x; } }
①  ArithmeticException
②  NumberFormatException
③  ArrayIndexOutOfBoundsException
④  IOException
【单选题】 给出下面代码段, 哪行将引起一个编译时错误?( ) 1) public class Test { 2) int n = 0; 3) int m = 0; 4) public Test(int a) { m=a; } 5) public static void main(String arg[]) { 6) Test t1,t2; 7) int j,k; 8) j=3; k=5; 9) t1=new Test(); 10) t2=new Test(k); 11) } 12) }
①  行1
②  行4
③  行6
④  行9
【单选题】 有以下程序,程序执行后的输出结果是( ) #include int fun(int x [ ],int n) { static int sum=0,i; for(i=0; i{ sum+=x[i]; } return sum; } void main( ) { int a[ ]={1,2,3,4,5}; int b[ ]={6,7,8,9},s=0; s=fun(a,5)+fun(b,4); printf(%d\n,s); }
①  45
②  50
③  60
④  66
【单选题】 下面的方法,当输入为2的时候返回值是多少?( ) public int getValue(int i) { int result = 0; switch (i) { case 1: result = result + i; case 2: result = result + i * 2; case 3: result = result + i * 3; } return result; }
①  0
②  2
③  4
④  10
【单选题】 Which of the following is not grammar presentation method?
①  Deductive method
②  Inductive method
③  Guided discovery method
④  Communicative teaching method.
【单选题】 阅读以下代码: import java.io.*; import java.util.*; public class foo{ public static void main (String[] args){ String s; System.out.println(s= + s); } } 输出结果应该是:( )
①  代码得到编译,并输出“s=”
②  代码得到编译,并输出“s=null”
③  由于String s没有初始化,代码不能编译通过
④  代码得到编译,但捕获到 NullPointException异常
【单选题】 为AB类的一个无形式参数无返回值的方法method书写方法头,使得使用类名AB作为前缀就可以调用它,该方法头的形式为( )。
①  static void method( )
②  public void method( )
③  final void method( )
④  abstract void method( )
随机题目
【判断题】 6O年代,焦菊隐在北京人民艺术剧院对《茶馆》《蔡文姬》《武则天》《虎符》的导演中,将斯坦尼斯拉夫斯基体验派表演体系同中国戏曲的写意抒情表演艺术相结合,创造了具有中国民族特色的北京人艺演剧风格。
①  正确
②  错误
【单选题】 小说《青春之歌》的时代背景是?
①  抗日战争
②  解放战争
③  “九·一八”至“一二·九”
④  “文革”十年
【单选题】 在新时期的文学创作中,产生了许多有影响的作品,如《班主任》《人到中年》《春之声》《绿化树》等,其中,《绿化树》的作者是?
①  王蒙
②  谌容
③  刘心武
④  张贤亮
【单选题】 和王朔年龄相仿、写作又差不多同时起步的余华、苏童、格非、马原等,他们大多写作的是
①  新写实小说
②  寻根小说
③  新历史小说
④  先锋小说
【判断题】 蒋子龙之后,一大批改革文学作品,如柯云路的《三千万》《新星》、李国文的《花园街五号》等。
①  正确
②  错误
【判断题】 和西方意识流小说相比,王蒙小说的人物意识的流动明显经过了理性的梳理,同时也不排除情节和叙述者的介入。在借鉴西方意识流创作技巧的同时,王蒙善于运用隐喻和象征的结构,通过对富有文化内涵的故事的叙述,使小说在现实性的基础上获得丰富的文化哲学意味。
①  正确
②  错误
【判断题】 在小说创作意识流中,王蒙有意中断小说的情节链,避开对小说人物过多的外部描写,以文本时间的变化为纲要,通过人物心理的闪回、停顿、放大、延长、对比、重复、独白、对话,将写作的焦点对准人物的“内宇宙”,展示人的丰富、复杂的内心世界,以人的内心世界折射时代和社会的变迁。
①  正确
②  错误
【判断题】 《孽子》是白先勇至今唯一的一部长篇小说。
①  正确
②  错误
【判断题】 60年代,黄佐临介绍布莱希特的叙述体戏剧体系,坚持在中国戏曲“写意戏剧观”的基础上探索中国话剧的民族化道路。
①  正确
②  错误
【判断题】 最早引起社会关注的探索戏剧是哲理剧《屋外有热流》。
①  正确
②  错误