wiki:jazz/09-07-07

2009-07-07

  • 成大工科實習生
  • Part 1 : Java 多個類別的寫法
    // 存為 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[]) {
    	System.out.print("args.length=" + args.length);
    	System.out.print("\n");
    	if(args.length < 2)
    	{
    		System.out.print("Usgage: java Test myData myWeight");
    		System.exit(1);
    	}
        Test myTest = new Test();
    	myClass myclass = new myClass();
        myTest.setMyData(args[0]);
        System.out.print(myTest.getMyData());
    	System.out.print("\n");
    	System.out.print(myclass.getWeight());
    	System.out.print("\n");
    	myclass.setWeight(args[1]);
    	System.out.print(myclass.getWeight());
      }
    }
    
    public class myClass
    {
    	public String myWeight;
    	
    	public String getWeight()
    	{
    		return myWeight;
    	}
    	
    	public void setWeight(String weight)
    	{
    		myWeight = new String(weight);
    	}
    	
    	public myClass()
    	{
    		setWeight("50");
    	}
    	
    	public static void main(String args[]) {
    		myClass myclass = new myClass();
    		System.out.print(myclass.getWeight());
    	}
    }
    
  • Part 2 : Linux 安裝
    • 2008 陽明大學 格網與叢集運算 課程 - 用 7-zip 解開至硬碟 或用 Daemon Tools 虛擬成光碟。
    • 記得確認複製或解壓縮出來的目錄取消"唯讀"權限
    • 請根據 Lab0, Lab1 的投影片步驟,包含 Slides\Lab0\Step-by-Step , Slides\Lab0\Step-by-Step 目錄裡的螢幕畫面當參考,學習基本 Debian Linux 安裝。
Last modified 15 years ago Last modified on Jul 9, 2009, 9:38:01 PM

Attachments (1)

Download all attachments as: .zip