题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-01 14:44:59

[单项选择]阅读下面代码
public class Test
 String s="One World One Dream";
 public static void main(String[] args)
  System.out.println(s);
 

其运行的结果是
A. args
B. One World One Dream
C. s
D. 编译时出错

更多"阅读下面代码 public class Test  String"的相关试题:

[单项选择]阅读下面程序
public class Test implements Runnable
public static void main(String[]args)
_______________________________________;
t. start( );

public void mR( )
System. out. println("Hello!");

}
在程序下画线处填入正确选项是
A. Test t=flew Test()
B. Thread t=new Thread();
C. Thread t=new Thread(new Test());
D. Test t=new Thread();
[单项选择]阅读下面程序
class Test implements Runnable
public static void main (String[] args)
Test t=new Test( );
t.start( );

public void run( )

下列关于上述程序的叙述正确的是______。
A. 程序不能通过编译,因为start()方法在Test类中没有定义
B. 程序编译通过,但运行时出错,提示start()方法没有定义
C. 程序不能通过编译,因为run()方法没有定义方法体
D. 程序编译通过,且运行正常
[单项选择]阅读下面代码
class Test implements Runnable
 public int run( )
  int i=0;
  while(true)
   i++;
   System.out.println("i="+i);
  
 

上述代码的编译结果是
A. 程序通过编译,并且run()方法可以正常输出递增的i值
B. 程序通过编译,调用run()方法将不显示任何输出
C. 程序不能通过编译,因为while的循环控制条件不能为true
D. 程序不能通过编译,因为run()方法的返回值类型不是void
[单项选择]阅读下面程序
class Test implements Runnable
 public static void main(String[] args)
  Test t=new Test( );
  t.start( ):
 
 public void run( )

下列关于上述程序的叙述正确的是
A. 程序不能通过编译,因为start()方法在Test类中没有定义
B. 程序编译通过,但运行时出错,提示start()方法没有定义
C. 程序不能通过编译,因为run()方法没有定义方法体
D. 程序编译通过,且运行正常
[单项选择]阅读下面程序
public class Test3
public static void main(String args[])
int x=3, y=4, z=5;
String s="xyz";
System.out.primln(s+x+y+z);


程序运行的结果是
A. xyzl2
B. xyz345
C. xyzxyz
D. 12xyz
[单项选择]阅读下面代码
public class Test2005
 public static void main(String args[])
  System.out.println(~(Oxa5)&Oxaa);
 

其运行结果是
A. Oxa5
B. 10
C. Ox50
D. Oxaa
[单项选择]阅读下面代码
public class Test
 public static void main(String[]args)
  System.out.println(2>010:8);
  

其运行的结果是
A. 2
B. 0
C. 10
D. 8
[单项选择]阅读下面程序
public class Test3
public static void main (String args[])
int x=3,y=4,z=5;
String S="xyz";
System.out.printIn(s+x+y+z);


程序运行的结果是______。
A. xyz12
B. xyz345
C. xyzxyz
D. 12xyz
[单项选择]阅读下面程序
public class Test2
public static void main (String args[])
int a=10, b=4, C=20, d=6;
System.out .printIn(a++*b+c*--d);


程序运行的结果是______。
A. 144
B. 160
C. 140
D. 164
[单项选择]阅读下面程序
public class Test2
 public static void main(String[] args)
  int a=10,b=4.c=20,d=6;
   System.out.println(a++*b+c*--d);
 

程序运行的结果是
A. 144
B. 160
C. 140
D. 164
[单项选择]阅读下面程序
public class Test4
 public static void main(String[] args)
  int 1=10,j=3;
  float m=213.5f,n=4.0f;
  System.out.println(i%j);
  System.out.println(m%n);
 

程序运行的结果是
A. 1.0和1.5
B. 1和1.5
C. 1.0和2.5
D. 1和2.5
[单项选择]阅读下面程序
public class Test3
 public static void main(String[] args)
  int x=3,y=4,z=5;
  String s="xyz":
  System.out.println(s+x+y+z);
 

程序运行的结果是
A. xyz12
B. xyz345
C. xyzxyz
D. 12xyz
[单项选择]阅读下面程序
public static void main (String[] args)
System.out.printIn (34+56-6);
System.out.printIn (26*2-3);
System.out.printIn (3*4/2);
System.out.printIn (5/2);

程序运行结果是______。
A. 84
B. 90
C. 84
D. 68
[单项选择]语句public String getEncoding( )的功能是( )。
A. 给当前输入流重做标记
B. 获得当前字符流所用的编码方式
C. 基于字节流in生成一个输入字符流对象
D. 给当前字符输入流设置编码方式
[单项选择]文件操作中,语句public String getPath( )的作用是( )。
A. 得到文件对象的父路径名
B. 得到文件的上一级目录名
C. 得到一个包含路径的文件名
D. 得到文件路径名字符串
[单项选择]阅读下列代码
public class Test2005
public static void main(String args[])
System.out. pfintln(~(0xa5)&0xaa);


其运行结果是( )。
A. 0xa5
B. 10
C. 0x50
D. 0xaa

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码