当前位置: 技术问答>java相关
SCJP模拟题 about Thread
来源: 互联网 发布时间:2015-03-26
本文导语: //在注释的地方选择合适的选项填入,以保证程序可以从1记数到100 class Counter { public int startHere=1; public int endHere=100; public static void main(String[] args) { new Counter().go(); } void go() { //**...
//在注释的地方选择合适的选项填入,以保证程序可以从1记数到100
class Counter
{
public int startHere=1;
public int endHere=100;
public static void main(String[] args)
{
new Counter().go();
}
void go()
{
//**********
Thread t=new Thread(a);
t.start();
}
}
A. Thread a=new Thread()
{
public void run()
{
for (int i=startHere;i
class Counter
{
public int startHere=1;
public int endHere=100;
public static void main(String[] args)
{
new Counter().go();
}
void go()
{
//**********
Thread t=new Thread(a);
t.start();
}
}
A. Thread a=new Thread()
{
public void run()
{
for (int i=startHere;i