MathUtils { public static int getDigitFromNumber(int number, int digitIndex) { return number / (int)Math.pow(10, digitIndex) % 10; }  static int getDigitFromNumber(int number, int digitIndex); static int getMax(int first, int second); static double logarithm(double base, double a);  }
@Test public void testGetDigitFromNumber() { Assert.assertEquals(MathUtils.getDigitFromNumber(2233445, 0), 5); Assert.assertEquals(MathUtils.getDigitFromNumber(2233445, 1), 4); Assert.assertEquals(MathUtils.getDigitFromNumber(2233445, 2), 4); Assert.assertEquals(MathUtils.getDigitFromNumber(2233445, 3), 3); Assert.assertEquals(MathUtils.getDigitFromNumber(2233445, 4), 3); Assert.assertEquals(MathUtils.getDigitFromNumber(2233445, 5), 2); Assert.assertEquals(MathUtils.getDigitFromNumber(2233445, 6), 2); }