|
@@ -7,128 +7,128 @@ public class PrimativeTypes {
|
7
|
7
|
|
8
|
8
|
//Add two ints and return the answer
|
9
|
9
|
public int add(int x, int y){
|
10
|
|
- return x + y;
|
|
10
|
+ return 0;
|
11
|
11
|
}
|
12
|
12
|
|
13
|
13
|
//Add two long's and return the answer
|
14
|
14
|
public long add(long x, long y){
|
15
|
|
- return x + y;
|
|
15
|
+ return 0;
|
16
|
16
|
}
|
17
|
17
|
|
18
|
18
|
//Add two short's and return the answer Must Type Cast
|
19
|
19
|
public short add(short x, short y){
|
20
|
|
- return (short) (x + y);
|
|
20
|
+ return 0;
|
21
|
21
|
}
|
22
|
22
|
//Add two bytes and return the answer, Must Type Cast
|
23
|
23
|
public byte add(byte x, byte y){
|
24
|
|
- return (byte) (x + y);
|
|
24
|
+ return 0;
|
25
|
25
|
}
|
26
|
26
|
|
27
|
27
|
//Add two floats and return the answer
|
28
|
28
|
public float add(float x, float y){
|
29
|
|
- return x + y;
|
|
29
|
+ return 0;
|
30
|
30
|
}
|
31
|
31
|
|
32
|
32
|
//Add two doubles and return the answer
|
33
|
33
|
public double add(double x, double y){
|
34
|
|
- return x + y;
|
|
34
|
+ return 0;
|
35
|
35
|
}
|
36
|
36
|
|
37
|
37
|
//Subtract two ints and return the answer
|
38
|
38
|
public int subtract(int x, int y){
|
39
|
|
- return x - y;
|
|
39
|
+ return 0;
|
40
|
40
|
}
|
41
|
41
|
|
42
|
42
|
//Subtract two long's and return the answer
|
43
|
43
|
public long subtract(long x, long y){
|
44
|
|
- return x - y;
|
|
44
|
+ return 0;
|
45
|
45
|
}
|
46
|
46
|
|
47
|
47
|
//Subtract two short's and return the answer Must Type Cast
|
48
|
48
|
public short subtract(short x, short y){
|
49
|
|
- return (short) (x - y);
|
|
49
|
+ return 0;
|
50
|
50
|
}
|
51
|
51
|
//Subtract two bytes and return the answer, Must Type Cast
|
52
|
52
|
public byte subtract(byte x, byte y){
|
53
|
|
- return (byte) (x - y);
|
|
53
|
+ return 0;
|
54
|
54
|
}
|
55
|
55
|
|
56
|
56
|
//Subtract two floats and return the answer
|
57
|
57
|
public float subtract(float x, float y){
|
58
|
|
- return x - y;
|
|
58
|
+ return 0;
|
59
|
59
|
}
|
60
|
60
|
|
61
|
61
|
//Subtract two doubles and return the answer
|
62
|
62
|
public double subtract(double x, double y){
|
63
|
|
- return x - y;
|
|
63
|
+ return 0;
|
64
|
64
|
}
|
65
|
65
|
|
66
|
66
|
//Divide two ints and return the answer
|
67
|
67
|
public int divide(int x, int y){
|
68
|
|
- return x / y;
|
|
68
|
+ return 0;
|
69
|
69
|
}
|
70
|
70
|
|
71
|
71
|
//Divide two long's and return the answer
|
72
|
72
|
public long divide(long x, long y){
|
73
|
|
- return x / y;
|
|
73
|
+ return 0;
|
74
|
74
|
}
|
75
|
75
|
|
76
|
76
|
//Divide two short's and return the answer Must Type Cast
|
77
|
77
|
public short divide(short x, short y){
|
78
|
|
- return (short) (x / y);
|
|
78
|
+ return 0;
|
79
|
79
|
}
|
80
|
80
|
//Divide two bytes and return the answer, Must Type Cast
|
81
|
81
|
public byte divide(byte x, byte y){
|
82
|
|
- return (byte) (x / y);
|
|
82
|
+ return 0;
|
83
|
83
|
}
|
84
|
84
|
|
85
|
85
|
//Divide two floats and return the answer
|
86
|
86
|
public float divide(float x, float y){
|
87
|
|
- return x / y;
|
|
87
|
+ return 0;
|
88
|
88
|
}
|
89
|
89
|
|
90
|
90
|
//Divide two doubles and return the answer
|
91
|
91
|
public double divide(double x, double y){
|
92
|
|
- return x / y;
|
|
92
|
+ return 0;
|
93
|
93
|
}
|
94
|
94
|
|
95
|
95
|
//Multiply two ints and return the answer
|
96
|
96
|
public int multiply(int x, int y){
|
97
|
|
- return x * y;
|
|
97
|
+ return 0;
|
98
|
98
|
}
|
99
|
99
|
|
100
|
100
|
//Multiply two long's and return the answer
|
101
|
101
|
public long multiply(long x, long y){
|
102
|
|
- return x * y;
|
|
102
|
+ return 0;
|
103
|
103
|
}
|
104
|
104
|
|
105
|
105
|
//Multiply two short's and return the answer Must Type Cast
|
106
|
106
|
public short multiply(short x, short y){
|
107
|
|
- return (short) (x * y);
|
|
107
|
+ return 0;
|
108
|
108
|
}
|
109
|
109
|
//Multiply two bytes and return the answer, Must Type Cast
|
110
|
110
|
public byte multiply(byte x, byte y){
|
111
|
|
- return (byte) (x * y);
|
|
111
|
+ return 0;
|
112
|
112
|
}
|
113
|
113
|
|
114
|
114
|
//Multiply two floats and return the answer
|
115
|
115
|
public float multiply(float x, float y){
|
116
|
|
- return x * y;
|
|
116
|
+ return 0;
|
117
|
117
|
}
|
118
|
118
|
|
119
|
119
|
//Multiply two doubles and return the answer
|
120
|
120
|
public double multiply(double x, double y){
|
121
|
|
- return x * y;
|
|
121
|
+ return 0;
|
122
|
122
|
}
|
123
|
123
|
|
124
|
124
|
//Return true
|
125
|
125
|
public boolean returnTrue(){
|
126
|
|
- return true;
|
|
126
|
+ return false;
|
127
|
127
|
}
|
128
|
128
|
|
129
|
129
|
//Return false
|
130
|
130
|
public boolean returnFalse(){
|
131
|
|
- return false;
|
|
131
|
+ return true;
|
132
|
132
|
}
|
133
|
133
|
|
134
|
134
|
}
|