Here you can find the source of versionStringToInt(String version)
private static int[] versionStringToInt(String version)
//package com.java2s; //License from project: Open Source License public class Main { private static int[] versionStringToInt(String version) { String strippedVersion = version.split("-")[0]; String[] strVersions = strippedVersion.split("\\."); int[] intVersions = new int[strVersions.length]; for (int i = 0; i < strVersions.length; i++) { intVersions[i] = Integer.parseInt(strVersions[i]); }//from w w w . jav a 2 s.c o m return intVersions; } }