1234567891011121314151617181920212223242526272829 |
-
-
- public class ShortCalculator {
-
- short x = (short) 65534;
- short y = (short) 65533;
-
- public short add(short x, short y){
- return (short) (x + y);
- }
-
- public short subtract(short x, short y){
- return (short) (x - y);
- }
-
- public short multiply(short x, short y){
- return (short) (x * y);
- }
-
- public short divide(short x, short y){
- return (short) (x / y);
- }
-
- public short remainder(short x, short y){
- return (short) (x % y);
- }
-
- }
|