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 e19b26f commit 4b97800Copy full SHA for 4b97800
src/main/java/com/booleanuk/core/Exercise.java
@@ -52,19 +52,22 @@ public Exercise(int age) {
52
provided to the name and age members
53
*/
54
55
-
+ public Exercise(String name, int age) {this.name = name; this.age = age;}
56
57
/*
58
2. Create a method named add that accepts two integers. The method should return the numbers added together.
59
60
61
+ public int add(int num1, int num2) {
62
+ return num1 + num2;
63
+ }
64
65
66
3. Create another method named add that accepts two Strings. The method should return the strings concatenated
67
together with a space in between.
68
69
70
+ public String add (String str1, String str2) {
71
+ return str1 + " " + str2;
72
73
}
0 commit comments