I've got a version number out of a package. It is given in the form 12345678. This is supposed to represent version 12.34.56.78 of the package. I'm just wondering whether there is a simple way of printing this in Java. So far the only thing I can come up with is
Code:
ver = 12345678;
v4 = ver % 100;
ver /= 100;
v3 = ver % 100;
ver /= 100;
v2 = ver % 100;
v1 = ver / 100;
System.out.printf ("%d.%d.%d.%d\n", v1, v2, v3, v4);