请教个问题 class child implement runnable{ void run() { }}...... static void main(){ new thread(new child).start(); }----------------这里 new thread(new child).start(); 是不是就是运行 child 的 run()过程呀?谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Java是严格区分大小写的,你的那个接口,应该是Runnable class child implement Runnable { void run() { } } ...... static void main() { new Thread(new child).start(); } 楼主的代码是有好几处是有问题的第一行两个错误第二行一个main方法错误main方法内一行也是错误的 class child implements Runnable{ public void run() { // TODO Auto-generated method stub System.out.println("started..."); } public static void main(String []args){ new Thread(new child()).start();//等价于下面三行 child c=new child(); Thread t=new Thread(c); t.start(); }} DavResource如果是目录怎么遍历???急!!! 求输出结果是为什么 线程参数传递不正确 求助 jsp无论如何也连不上数据库!!! 这样的字符串如何用JS排序? 为啥类不能声明为保护的呢? set java_home=C:\java1.4 怎样能实现对int[] 数组进行降序排序? 。。。如何将Win下的.class移植到Linux下。。。 想报一个培训班学习软件编程,我该怎么选择,谢谢各位! 编写java程序,计算1!+2!+3!+...20!之和并在屏幕上输出 紧急求救: 如何实现窗口中的组件大小随其窗口大小的改变而改变?
{
void run()
{ }
} ......
static void main()
{
new Thread(new child).start(); }
第一行两个错误
第二行一个
main方法错误
main方法内一行也是错误的
class child implements Runnable
{ public void run() {
// TODO Auto-generated method stub
System.out.println("started...");
}
public static void main(String []args){
new Thread(new child()).start();//等价于下面三行
child c=new child();
Thread t=new Thread(c);
t.start();
}
}