首页 > 大学专科> 电子信息
题目内容 (请给出正确答案)
[主观题]

1public class Test{ public static void main(String[ ] args) { String nam

1public class Test{ public static void main(String[ ] args) { String name[ ]=new String[5]; for(int i=0; i<args.length; ++i) name[i] = args[i]; System.out.println(name[2]); } } 命令行中的输入为:java Test a b 程序的输出是【 】 。

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“1public class Test{ public sta…”相关的问题
第1题
请写出下面程序的运行结果: public class Test extends TT{ public static void main(

请写出下面程序的运行结果: public class Test extends TT{ public static void main(String args[] Test t=new Test ("Tom."); } public Test(String s){ super (s); System.out.print("How are you?"); } public Test(){ this("I am Jack."); } } class TT{ public TT(){ System.Out.print ("Hi!"); } public TT(String s){ this (); System.out.print("I am"+s); } } 结果:【 】。

点击查看答案
第2题
如下哪个不是Java中有效的变量名?()

A.class

B.student

C.data

D.test

点击查看答案
第3题
类Test定义如下: class Test { public static void main(string args[]) { St

类Test定义如下: class Test { public static void main(string args[]) { String s1="abc"; String s2=new String(s1); i(s1==s2) System.out.println("s1==s2"; i(s1.equals(s2)) System.out.println("s1.equals(s2)"); } } 那么程序的执行结果为:【 】

点击查看答案
第4题
Tom's score on the English test is the lowest in his class; he ______ have studied very ha
rd.

A.may

B.must

C.should

D.can

点击查看答案
第5题
下列哪个选项的java源文件代码片段是不正确的?A.package testpackage; public class Test{ }B.im

下列哪个选项的java源文件代码片段是不正确的?

A.package testpackage; public class Test{ }

B.import java.io.* ; package testpackage; public class Test{ }

C.import java.io.*; class Person{ } public class Test{ }

D.import java.io.*; import java.awt.*; public class Test{ }

点击查看答案
第6题
下面哪些代码段是正确的Java源程序?()
A.package testpackage;

public class Test{//do something...}

B.import java.io.*;

package testpackage;

public class Test{// do something...}

C.import java.io.*;

class Person{// do something...}

public class Test{// do something...}

D.import java.io.*;

import java.awt.*;

public class Test{// do something...}

点击查看答案
第7题
阅读下列代码public class Test 2005{public static void main(String args[]){ System.out.prin

阅读下列代码 public class Test 2005{ public static void main(String args[]){ System.out.println((3>2)?4:5); } } 其运行结果是

A.2

B.3

C.4

D.5

点击查看答案
第8题
下面是一个类的定义,试将程序补充完整。 class Test { String s; 【 】int a =66
; Test(String s1) { s=s1; } static int geta() { return a; } }

点击查看答案
第9题
下列代码的执行结果是()。public class Test{ public static void main(String args[]) {int a=4,

下列代码的执行结果是()。 public class Test { public static void main(String args[]) { int a=4,b=6,c=8; String s="abc"; System.out.println(a+b+s+c); System.out.println(); } }

A.ababcc

B.464688

C.46abc8

D.10abc8

点击查看答案
第10题
Java中,在如下所示的Test类中,共有()个构造方法。public class Test{private int x;public Tes

A.0

B.1

C.2

D.3

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