rationaltest.java
来自「设计rational类」· Java 代码 · 共 27 行
JAVA
27 行
/*
* Created on 2007-4-17
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
/**
* @author hulmous
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class RationalTest {
public static void main(String[] args){
Rational a=new Rational();
Rational b=new Rational(10);
Rational c=new Rational(12,45);
a.show();
b.show();
c.show();
Rational ans=new Rational ();
ans=b.add(c);
ans.show();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?