【单选题】【消耗次数:1】
已知有下面类的说明: 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 X5_1_2 extends x{ int ab() { static int aa=10; aa++; System.out.println(aa); } public static void main(String[] args) { X5_1_2 x=new X5_1_2(); x.ab(); } }
①  10
②  11
③  编译错误
④  运行成功,但不输出
【单选题】 运行下面程序时,会产生什么异常?( ) 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
【单选题】 运行下面程序时,会产生什么异常?( ) 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
【单选题】 关于以下application的说明,正确的是( ) 1. class StaticStuff 2. { 3. static int x=10; 4. static { x+=5;} 5. public static void main(String args[ ]) 6. { 7. System.out.println(“x=” + x); 8. } 9. static { x/=3;} 10. }
①  4行与9行不能通过编译,因为缺少方法名和返回类型
②  9行不能通过编译,因为只能有一个静态初始化器
③  编译通过,执行结果为:x=5
④  编译通过,执行结果为:x=3
【单选题】 已知f(x+1)=2x-5,求f(x)
①  2x-7
②  2x-5
③  x+7
④  x-7
【单选题】 关于以下程序代码的说明正确的是( ) 1.class HasStatic{ 2. private static int x=100; 3. public static void main(String args[ ]){ 4. HasStatic hs1=new HasStatic( ); 5. hs1.x++; 6. HasStatic hs2=new HasStatic( ); 7. hs2.x++; 8. hs1=new HasStatic( ); 9. hs1.x++; 10. HasStati@@x- -; 11. System.out.println(“x=”+x); 12. } 13. }
①  5行不能通过编译,因为引用了私有静态变量
②  10行不能通过编译,因为x是私有静态变量
③  程序通过编译,输出结果为:x=103
④  程序通过编译,输出结果为:x=102
【单选题】 下面代码运行后的输出结果为( ) 。 public class X6_1_5 { public static void main(String[] args) { AB aa = new AB(); AB bb; bb = aa; System.out.println(b@@equals(aa)); } } class AB{ int x = 100; }
①  true
②  false
③  编译错误
④  100
【单选题】 以下程序的输出的结果是()。 int x=3; main( ) int i; for(i=1;i<x;i++)incre( );incre( ) staic int x=1; x*=x+1; printf( %d, x);
①  25
②  26
③  27
④  28
【判断题】 f(x)=√(x-1)/√(x+1),g(x)=√((x-1)/(x+1)) ;f(x)=g(x)
①  正确
②  错误
【判断题】 f(x)=(x^2-1)/(x-1),g(x)=x+1;f(x)=g(x)
①  正确
②  错误
随机题目
【多选题】 杜甫诗歌的写实手法体现在?
①  自传诗
②  纪行诗
③  怀古诗
④  家事诗
⑤  反映社会现实的诗
【单选题】 杜甫一生经历过①漂泊西南;②陷贼为官;③读书游历;④十年困守长安等四个阶段,按时间顺序排列四个阶段,正确的是_________。
①  ①②③④
②  ②①④③
③  ④③①②
④  ③④②①
【单选题】 白居易的诗歌类型不包括________。
①  闲适诗
②  山水诗
③  感伤诗
④  讽谕诗
【单选题】 “李杜”指的是________。
①  李白和杜牧
②  李白和杜甫
③  李商隐和杜牧
④  李商隐和杜甫
【单选题】 杜诗的诗史性质决定了它的写作手法和诗歌体裁的变化:他大量使用叙事手法,以________写时事。
①  五七言律诗
②  五七言绝句
③  古体诗
④  歌行题
【单选题】 唐代诗歌的发展,一般分为四段。①初唐;②中唐;③盛唐;④晚唐, 按顺序应该是________。
①  ①②③④
②  ①④②③
③  ①③②④
④  ④③②①
【单选题】 晚唐诗人杜牧写下名句“二十四桥明月夜,玉人何处教吹箫。”这是描写________的旖旎风光。
①  扬州
②  无锡
③  南京
④  常州
【单选题】 唐代古文运动的倡导者是________。
①  白居易
②  韩愈
③  刘禹锡
④  杜甫
【单选题】 杜甫一生经历过①漂泊西南;②陷贼为官;③读书游历;④十年困守长安等四个阶段,把四个阶段按时间顺序排列正确的是________。
①  ①②③④
②  ②①④③
③  ④③①②
④  ③④②①
【单选题】 韩愈的《早春·呈张水部十八员外》具有以下某项特征________。
①  以雄大的气势见长
②  以怪奇的意象著称
③  以写赋作文的方法写诗
④  也有写得平实顺畅清新自然的