题目

[问答题]下列程序打包到example包,main方法调用线程类输出0~9这10个数,请填写横线处的内容。
注意:请勿改动main()主方法和其他已有语句内容,仅在横线处填入适当语句。
______
interfaceMyInterface
publicabstractvoidprint(intn);
classMythreadextendsThread______MyInterface
publicvoidrun()
for(inti=0;i<10;i++)
this.print(i);
publicvoidprint(intn)
System.out.print(n+"");
publicclassExample1_6
publicstaticvoidmain(Stringargv[])
Mythreadth=newMythread();
______

提示:未搜索到的试题可在搜索页快速提交,您可在会员中心"提交的题"快速查看答案。
答案
查看答案
相关试题
[填空题]下述语句段在运行时的显示结果是【】。  Cis  x=10.34+8  PrintLen(x)

机密信息纸介质资料废弃应用碎纸机粉碎或焚毁。

[单项选择题]Java编译器产生的文件扩展名是______。
A..java
B..class
C..exe
D..html
[单项选择题]下列哪个类是Applet进行绘制的关键类,它支持基本绘图,另外还支持图形绘制方法
A.多线程.
B.动态连接
C.异常同步
D.异常处理
[问答题]在程序中,用户使用JOptionPane输入一个二维数组的行数,程序随机生成每一行的列数,并对其赋值。最后显示这个二维数组。请填写横线处的内容。
注意:请勿修改main()主方法和其他已有语句内容,仅在横线处填入适当语句。
importjavax.swing.*;
publicclassbasic
publicstaticvoidmain(String[]args)
StringsDimU=JOptionPane.showInputDialog("请输入数组的行数");
intiDimU=______(sDimU);
int[].[]numbers=newint[iDimU][];
for(inti=0;i<iDimU;i++)
intk=(int)(Math.random()*5+1);
numbers[i]=______;
for(inti=0;i<iDimU;i++)
for(intj=0;______;j++)
numbers[i][j]=(int)(Math.random()*l00);
System.out.print(numbers[i][j]+"");
System.out.println();
System.exit(O)
联系我们 会员中心
返回顶部