jazz/09-07-08: Test.java
File Test.java, 419 bytes (added by jazz, 15 years ago) |
---|
Line | |
---|---|
1 | // ¦s¬° Test.java |
2 | import java.io.*; |
3 | import java.lang.String; |
4 | |
5 | public class Test extends Parent |
6 | { |
7 | public String myData; |
8 | |
9 | public String getMyData() |
10 | { |
11 | return myData; |
12 | } |
13 | |
14 | public void setMyData(String data) |
15 | { |
16 | myData = new String(data); |
17 | } |
18 | |
19 | public static void main(String args[]) { |
20 | Test myTest = new Test(); |
21 | myTest.setMyData("ABCD"); |
22 | System.out.print(myTest.getMyData()); |
23 | } |
24 | } |