¶
- - 태 행
- 클 - OOP 하 해 하
HelloWorld.java ¶
~cpp
import javax.swing.*;
public class HelloWorld {
private String sentence;
public HelloWorld()
{
}
public HelloWorld(String temp)
{
sentence = temp;
}
public void setSentence(String temp)
{
sentence = temp;
}
public void Say()
{
JOptionPane.showMessageDialog(null, sentence);
}
}
TestHello.java ¶
~cpp
public class TestHello {
public static void main(String args [])
{
HelloWorld h = new HelloWorld();
h.setSentence("Hello World!");
h.Say();
HelloWorld h2 = new HelloWorld();
System.exit(0);
}
}
클 ¶
- 태 ( 휴, )
- 하
- 휴
- 태
- 하
| 한 | JavaStudy2004/한 |
| JavaStudy2004/ |










