可以說我有一個主要的課程,我的主要課程是用它來運行的。我怎樣才能打電話給另一個班級
public calss Main{
public static void main(String[] args){
System.out.print("input Length ");
a = in.nextInt();
System.out.print("input Height ");
b = in.nextInt();
...
(The code that goes in between?)
...
System.out.println("output");
}
}
如何使用在側另一個類,並輸入它我的第一類可說,如果它是一個簡單的計算類像
pubic class Math{
output = a*b
}
,並有一個像這樣的輸入和輸出:
input Length 2
input Height 3
6
順便說一句,不投票給我,因爲我是noob!共同爲什麼你這樣做? XD
可能是值得的通過這些:http://docs.oracle.com/javase/tutorial/java/index.html – FelixMarcus 2014-10-31 14:49:03