### Question:
JavaVersion { public boolean newerThan(JavaVersion version) { if (getMajor() > version.getMajor()) return true; if (getMajor() < version.getMajor()) return false; if (getMinor() > version.getMinor()) return true; if (getMinor() < version.getMinor()) return false; if (getMicro() > version.getMicro()) return true; if (getMicro() < version.getMicro()) return false; if (getUpdate() > version.getUpdate()) return true; if (getUpdate() < version.getUpdate()) return false; if (getBuild() > version.getBuild()) return true; if (getBuild() < version.getBuild()) return true; return false; } JavaVersion(String string); static JavaVersion getVersion(String string); boolean newerThan(JavaVersion version); boolean newerOrEquals(JavaVersion version); boolean olderThan(JavaVersion version); boolean olderOrEquals(JavaVersion version); long getMajor(); long getMinor(); long getMicro(); long getUpdate(); long getBuild(); String toMinor(); String toJdkStyle();  }### Answer:
@Test public void testNewerThan() { JavaVersion jv1 = JavaVersion.getVersion("1.7.0_10-ea"); JavaVersion jv2 = JavaVersion.getVersion("1.7.0_11"); assertTrue(jv2.newerThan(jv1)); }