首页 > 考研
题目内容 (请给出正确答案)
[单选题]

有语句String s=”hello world”;以下哪行操作会出现语法错误()

A.s>>>=1;

B.int i=s.length();

C.String ts=s.trim();

D.String t=s+”!”;

答案
收藏

A、s>>>=1;

如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“有语句String s=”hello world”;以下哪行…”相关的问题
第1题
顺序执行下列两个语句的输出结果是_________。 String s = "全国计算机等级考试";Systeth.out.pr
intln(s.length() )

点击查看答案
第2题
在下面的代码段中填入一个适当的语句,表示从输入流中能读取对象(注:FileInputStream的形象为the

在下面的代码段中填入一个适当的语句,表示从输入流中能读取对象(注:FileInputStream的形象为the Time)。 FileInputStream in=【 】; ObjectInputStream s=ObjectInputStream(in); String today=(String)s.readObject(); Date data=(Date)s.readObject();

点击查看答案
第3题
请在划线处编写适当语句,完成此程序使它能正确执行。 import java.io.*; public class Le
ap Year{ public static void main (String arget[]) throws IOException{ InputStreamReader ir; BufferedReader in; ir=new Input Stream Reader (System.in); in=new BufferedReader(ir); System.out.println(“输入年份是:”): String s=in.readLine(); int year=Integer.parseInt(s); { System.out.println(" "+ year+“年是闰年。”); } else { System.out.println(" " +year+“年不是闰年。”); } } }

点击查看答案
第4题
下面是用 RandomAccessFile oureFile; Strings="information to Append\n mon!\n";
ureFile=newRandomAccessFile oureFile("phone.number,numbers","rw"); 模式打开访问oureFile文件,并在文件尾加信息s的addFile的源程序。请在下划线处填 上适当的语句将程序补充完整。 import java.io.*; Class addFile { public static void main (String args[])throws IOException { RandomAccessFile oureFile; _____________ =oureFile=new RandomAccessFile oureFile("phone.number,numbers","rw"); oureFile.seek(oureFile.length()); oureFile.writebytes(s); oureFile.close(); }

点击查看答案
第5题
下列的程序的功能是简单的进行键盘输人测试,请补充完整程序。 import javax.swing.*; p
ublic class Testzzz { public static void main(String[ ]args) { String name=JOptionPane.【 】("What is your name?"); System.out.println("Hello"+name); System.exit(0); } }

点击查看答案
第6题
通过实现Runnable接口创建线程,请在画线处加入正确的代码完成此程序【 】。 public class Thre
adTest { public static void main(String args[ ]) { Thread t1=new Thread(new Hello()); Thread t2=new Thread(new Hello()); ______; t2.start(); } } class Hello implements Runnable { int i; public void run() { while(true) { System.out.println("Hello"+i++); if(i==5) break; } } }

点击查看答案
第7题
下列程序的功能是创建了一个显示5个"Hello!"的线程并启动运行,请将程序补充完整。 public cl
ass ThreadTest extends Thread{ public static void main(String args[ ]){ ThreadTest t = new【 】; t.start(); } public void run(){ int i =0; while(true){ System.out.println("Hello!"); if(i++==4) break; } } }

点击查看答案
第8题
1下列程序的功能是创建了一个显示5个“Hello!”的线程并启动运行,请将程序补充完整。 public class
ThreadTest extends Thread{ public static void main(String args[ ]){ ThreadTest t=new【 】; t.start(); } public void run() { int i =0; while(true){ System.out.println("Hello!"); if(i++==4) break; }}}

点击查看答案
第9题
Python语句' '.join(list('hello world!'))执行的结果是()。

A.hello world !

B.’hello world!’

C.hello world

D.list(‘hello world!’)

点击查看答案
第10题
撤销hello用户对表students赋予删除权限正确的语句是()。

A.revokeselectonstudentstohello

B.revokedeleteonstudentstohello

C.denyupdateonstudentstohello

D.grantdeleteonstudentstohello

点击查看答案
第11题
不能把字符串Hello!赋给数组b的语句是()

A.char b[10];b=”Hell0 !";

B.char b[10]={'H','e','l','l','o','!'};

C.char b[10];strcpy(b,"Hello !");

D.char b[10]="Hello !";

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改