标题:为什么不可以识别main()
只看楼主
batwyx
Rank: 1
等 级:新手上路
威 望:1
帖 子:88
专家分:0
注 册:2007-4-16
得分:0 
回复:(菜鸟也疯狂)String [] args 和String args[]...

哦,这样啊?谢谢!


2007-09-25 22:01
晨风lxj
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2007-9-13
得分:0 

修改后的程序应该如下:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

public class hello extends JFrame{
hello(String title){
super(title);
setSize(300,200);
setVisible(true);
}
public static void main(String[] args){
new hello("helloworld");
}
}

2007-09-25 23:05



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-172442-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.132332 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved