Version 7 (modified by jazz, 15 years ago) (diff) |
---|
2009-07-06
- 成大工科實習生 Java 教學
- 下載 JDK 6 文件
- 下載 JDK 6
- 設定 PATH 系統環境變數:"C:\Program Files\Java\jdk1.6.0_14\bin"
- 設定 CLASSPATH 系統環境變數:" . ; C:\Program Files\Java\jdk1.6.0_14\jre\lib\rt.jar"
- Java Tutorial
// 存為 Test.java import java.io.*; import java.lang.String; public class Test { public String myData; public String getMyData() { return myData; } public void setMyData(String data) { myData = new String(data); } public static void main(String args[]) { Test myTest = new Test(); myTest.setMyData("This is a test"); System.out.print(myTest.getMyData()); } }
- 下載 Java Tutorial 的 HelloWorldApp? 範例
- 編譯 HelloWorld? 與 Test.java
javac Test.java javac HelloWorldApp.java
Attachments (1)
- HomeWork.png (9.3 KB) - added by jazz 15 years ago.
Download all attachments as: .zip