【发布时间】:2014-10-31 14:45:36
【问题描述】:
假设我有一个 Main 类,我的主程序用它运行。
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
顺便说一句,不要投票给我,因为我是菜鸟!你为什么这样做?呵呵
【问题讨论】: