[单选题]

阅读下列代码段 abstract class Person{ public Person(String n){ name=n; } public______String getDescription(); public String getName(){ } private String name; } 在下画线处应填入的修饰符是

A.static

B.abstract

C.protected

D.final

参考答案与解析:

相关试题

阅读下面代码abstract class Person { public Per

[单选题]阅读下面代码 abstract class Person { public Person(String n) { name=n; } public______String getDescription(); public String getName() { return name; } private String name; } 在下画线处应填入的修饰符是A.staticB.abstractC.protectedD.final

  • 查看答案
  • 阅读下列代码Public class Person{Static int arr

    [单选题]阅读下列代码Public class Person{Static int arr[ ] = new int (10);Public static void main (String args ) {System.out.println(arr[9]);}}该代码运行的结果是A. )编译时将产生错误B. )编译时正确,运行时将产生错误C. )输出 0D. )输出空

  • 查看答案
  • 阅读下面代码public class Person { static int a

    [单选题]阅读下面代码 public class Person { static int arr[]=new int[10]; public static void main(String args) { System.out.println(arr[9]); } } 该代码的运行结果是A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空

  • 查看答案
  • 阅读下列代码后public class Person{int arr[]=new

    [单选题]阅读下列代码后public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); }}正确的说法是A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空

  • 查看答案
  • 阅读下列代码后public class Person{int arr[]=new

    [单选题]阅读下列代码后 public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println (arr[1]); } } 正确的说法是( )。A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空

  • 查看答案
  • 阅读下列代码后public class Person{ int arr[]=ne

    [单选题]阅读下列代码后 public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); } } 正确的说法是A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空

  • 查看答案
  • 阅读下列代码后 public class Person{ int art[]=n

    [单选题]阅读下列代码后 public class Person{ int art[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); } } 正确的说法是( )。A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空

  • 查看答案
  • 阅读下列代码后public class Person{int arr[]=new

    [单选题]阅读下列代码后 public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); } } 正确的说法是( )。A.编译时将产生错误B.编译时正确,运行时将产生错误C.输出零D.输出空

  • 查看答案
  • 阅读下列代码public class Arrays{public static

    [单选题]阅读下列代码 public class Arrays{ public static void main(String[]args){ int[]a=new int[5]; for(int i=0;i<a. length; i=i+1){ a[i]=10+i; } for(int i=0; i<a. length; i=i+1){ System. out. println(a[i]); } String[]s={"Frank","Bob","Jim"}; for(int i=0; i<

  • 查看答案
  • 阅读下列代码public class Jixiangwu{ public sta

    [单选题]阅读下列代码 public class Jixiangwu{ public static void main(String[]args){ String[]stars={"贝贝","晶晶","欢欢","迎迎","妮妮"}; System. out. println("你抽取的奥运吉祥物是"+"“" +stars[(int)(stars. ______* Math. random())]+"”"+"!"); } } 为保证程序能正确执行,程序中下画线处应填写的是

  • 查看答案
  • 阅读下列代码段abstract class Person{public Pers