Peter Benda wrote:this code created a based 10 value
Nope, it doesn't. It parses a base 16 numeral, increments it, and then prints it as a base 16 numeral. Numbers don't have a base. Numerals (string representations of numbers) have a base.
Anyway, the methods you're looking for to do this are Long.parseLong(s, radix) and String.format(format, args). You will want to use "%010x" as the format string, but see the Formatter documentation to see why that is.