diff --git a/src/com/jwetherell/algorithms/numbers/Integers.class b/src/com/jwetherell/algorithms/numbers/Integers.class new file mode 100644 index 00000000..e3f8d452 Binary files /dev/null and b/src/com/jwetherell/algorithms/numbers/Integers.class differ diff --git a/src/com/jwetherell/algorithms/numbers/Integers.java b/src/com/jwetherell/algorithms/numbers/Integers.java index fb86fd3d..ea1d1e16 100644 --- a/src/com/jwetherell/algorithms/numbers/Integers.java +++ b/src/com/jwetherell/algorithms/numbers/Integers.java @@ -8,6 +8,13 @@ public class Integers { private static final BigDecimal ZERO = new BigDecimal(0); private static final BigDecimal TWO = new BigDecimal(2); + private static final int BILLION = 1000000000; + private static final int MILLION = 1000000; + private static final int THOUSAND = 1000; + private static final int HUNDRED = 100; + private static final int TEN = 10; + // New constants for frequently used numbers + // Code Modified :) public static final String toBinaryUsingDivideAndModulus(int numberToConvert) { int integer = numberToConvert; @@ -137,11 +144,7 @@ public static final boolean powerOfTwoUsingBits(int numberToCheck) { multiDigits.put(90,"ninety"); } - private static final int BILLION = 1000000000; - private static final int MILLION = 1000000; - private static final int THOUSAND = 1000; - private static final int HUNDRED = 100; - private static final int TEN = 10; + private static final String handleUnderOneThousand(int number) { StringBuilder builder = new StringBuilder();