当前位置: 技术问答>java相关
我还是不知道如何在JB中调试helloworld程序,写在application中,运行出来只有一个空白板啊
来源: 互联网 发布时间:2015-01-19
本文导语: class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } | import java.awt.*; import java.awt.event.*; public class wwwww extends Frame { public wwwww(String s) { Label l...
class HelloWorld
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
|
import java.awt.*;
import java.awt.event.*;
public class wwwww extends Frame
{
public wwwww(String s)
{
Label l = new Label(s);
add(l);
this.addWindowListener (new WindowAdapter(){
public void windowClosing(WindowEvent e){
dispose();
System.exit(0);
}
});
}
public static void main(String args[])
{
String tt = "hellow";
System.out.println(tt);
wwwww f = new wwwww(tt);
f.setSize(100,100);
f.show();
}
}
import java.awt.event.*;
public class wwwww extends Frame
{
public wwwww(String s)
{
Label l = new Label(s);
add(l);
this.addWindowListener (new WindowAdapter(){
public void windowClosing(WindowEvent e){
dispose();
System.exit(0);
}
});
}
public static void main(String args[])
{
String tt = "hellow";
System.out.println(tt);
wwwww f = new wwwww(tt);
f.setSize(100,100);
f.show();
}
}