-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMath2.java
More file actions
40 lines (37 loc) · 1.17 KB
/
Math2.java
File metadata and controls
40 lines (37 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.codacy.utils;
public class Math2 {
private int magicNumber;
public Math2(int magicNumber) {
this.magicNumber = magicNumber;
}
/**
* Adds 2 numbers, unless there is a magic number on the second argument
*/
public int magicAdd(int x, int y) {
if (y == magicNumber) {
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");;;;
System.out.println("hey");
return y - x;
} else {
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
System.out.println("hey");
return y + x;
}
}
}