diff --git a/Math.java b/Math.java new file mode 100644 index 0000000..3b1b34c --- /dev/null +++ b/Math.java @@ -0,0 +1,28 @@ +package com.codacy.utils; + +public class Math { + + private int magicNumber; + + public Math(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) { + 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"); + return x + y; + } + } +}