VersionUtils { public static boolean gt(String version1, String version2) { Version v1 = parse(version1); Version v2 = parse(version2); return v1.compareTo(v2) > 0; }  static Version parse(String version); static boolean equal(String version1, String version2); static boolean gt(String version1, String version2); static boolean ge(String version1, String version2);  }
@Test public void testGt() { Assert.assertTrue(VersionUtils.gt("1.0.1", "1.0.0")); Assert.assertFalse(VersionUtils.gt("1.0.1", "1.0.1")); Assert.assertTrue(VersionUtils.gt("11", "1.0.1")); Assert.assertTrue(VersionUtils.gt("11.0.0", "1.0")); }