We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 891f0c1 commit b0ffbcfCopy full SHA for b0ffbcf
src/main/java/math/Int.java
@@ -0,0 +1,23 @@
1
+package math;
2
+
3
+public class Int {
4
5
+ private final int value;
6
7
+ public String toString() {
8
+ return Integer.toString(value);
9
+ }
10
11
+ private Int() {
12
+ this.value = 0;
13
14
15
+ public Int(int value) {
16
+ this.value = value;
17
18
19
+ public Int add(Int other) {
20
+ return new Int(this.value + other.value);
21
22
23
+}
0 commit comments