首页 > 酒饮料精制茶制造人员
题目内容 (请给出正确答案)
[主观题]

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题
下列哪个选项的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{ }

点击查看答案
第2题
John's score on the test is the highest in his class, he ______ very hard.A. must have

John's score on the test is the highest in his class, he ______ very hard.

A. must have studied

B. should have studied

C. must study

D. should study

点击查看答案
第3题
阅读下列代码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

点击查看答案
第4题
下列代码的执行结果是 public class Test{ public int aMethod() { static int i=0;

下列代码的执行结果是 public class Test{ public int aMethod() { static int i=0; i+ +; System.out.println(i); } public static void main(String args[ ]){ Test test = new Test(); test.aMethod(); } }

A.编译错误

B.0

C.1

D.运行成功,但不输出

点击查看答案
第5题
下列程序test类中的变量e的最后结果为()。public class test{ public static void main (String a

下列程序test类中的变量e的最后结果为()。 public class test { public static void main (String args[]) { int a=10; int b; int c; if(a>50) { b=9; } c=b+a; } }

A.10

B.0

C.19

D.编译出错

点击查看答案
第6题
有如下程序:#include<iostream>using namespace std;class Test{public:Test(){n+=2;}~Test(){n-

有如下程序: #include<iostream> using namespace std; class Test{ public: Test() {n+=2;} ~Test() {n-=3;} static int getNum(){return n;} private: static int n; }; int Test::n=1; int main() { Test* p=new Test; delete p; cout<<"n="<<Test::getNum()<<endl; return0; } 执行后的输出结果是()。

A.n=0

B.n=1

C.n=2

D.n=3

点击查看答案
第7题
下列代码的执行结果是()。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

点击查看答案
第8题
有如下程序:#include<iostream>using namespace std;class Test{public:Test(){n+=2;}~Test(){n-

有如下程序: #include<iostream> using namespace std; class Test{ public: Test() {n+=2;} ~Test() {n-=3;} static int getNum(){return n;} private: static int n; }; int Test::n=1; int main() { Test*p=new Test; delete p; cout<<"n="<<Test::getNum()<<endl; return 0; } 执行后的输出结果是()

A.n=0

B.n=1

C.n=2

D.n=3

点击查看答案
第9题
In your first days at the school you’ll be given a test to help the teachers to ___
_____ you to a class at your level.

A) locate

B) assign

C) deliver

D) place

点击查看答案
第10题
阅读下面程序class Test implements Runnable{public static void main(String[] args){Tes

阅读下面程序

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) 程序编译通过,且运行正常

点击查看答案
第11题
关于下面的程序段,说法正确的是import java.awt.*;import java.applet.*;public class Test exte

关于下面的程序段,说法正确的是 import java.awt.*; import java.applet.*; public class Test extends Applet{ Canvas MyCanvas; public void init(){ MyCanvas=new Canvas(); MyCanvas.setBackground(Color.cyan); add(MyCanvas); } }

A.程序可以运行,且看到显示

B.程序编译出错

C.程序可以运行,但看不到显示

D.以上说法都不对

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