Понимаю что должно быть все просто но не получается. Дано условие You need to double the integer and return it. class Java { public static int doubleInteger(int i) { // Double the integer and return it! return i; } } Делаю так class Java { public static int doubleInteger(int i) { int k = (int) 1.0; double g = i * k; return (int) g; } } К задаче идет тест mport org.junit.*; import org.junit.rules.*; import org.junit.runner.Description; public class JavaTest{ @Test public final void test_all() { Assert.assertEquals( "Nope!" , 4, Java.doubleInteger(2)); // Test cases here! } } при проверке выдает Test Results: JavaTest test_all Nope! expected:<4> but was:<2> Stack Trace Completed in 4ms Completed in 19ms при замене в методе типа возвращаемого значения на double class Java { public static double doubleInteger(int i) { int k = (int) 1.0; double g = i * k; return g; } } тест выдает Test Results: JavaTest test_all Use assertEquals(expected, actual, delta) to compare floating-point numbers Stack Trace Completed in 3ms Completed in 16ms STDERR Note: ./src/test/java/JavaTest.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.