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 96b1072 commit ed6e664Copy full SHA for ed6e664
src/main/java/com/codacy/utils/Math2.java
@@ -0,0 +1,31 @@
1
+package com.codacy.utils;
2
+
3
+public class Math2 {
4
5
+ private int magicNumber;
6
7
+ public Math(int magicNumber) {
8
+ this.magicNumber = magicNumber;
9
+ }
10
11
+ /**
12
+ * Adds 2 numbers, unless there is a magic number on the second argument
13
+ */
14
+ public int magicAdd(int x, int y) {
15
+ if (y == magicNumber) {
16
+ int cenas = 12345;
17
+ int maisCenas = 67890;
18
+ if (cenas > maisCenas) {
19
+ System.out.println("what?");
20
+ return x;
21
+ } else if (cenas < maisCenas) {
22
+ return y;
23
+ } else {
24
+ return y - x;
25
26
27
+ System.out.println("hey");
28
+ return x + y;
29
30
31
+}
0 commit comments