Strictly speaking, your method does not convert the hex string into decimal. Rather, it parses the hex string as an integer. It's
PrintWriter.println(int) that actually converts it to base-10 notation. Until then, it's just a signed 32-bit number, not in any particular base. (Well, the Java Language Specification doesn't say so, but you know that your computer works in base 2.)
Therefore, if you wanted to reinvent the wheel, you should rename your function to
public static int fromHex(String hex)
You don't do any validation, so any unexpected characters would be interpreted as a -1 hexdigit, since that's how
String.indexOf() behaves. There are a number of reasonable behaviours in the face of unexpected input, but this is one of the least expected failure modes. (Throwing an exception would be best.) Note that lowercase a-f are unsupported, and thus fail in that manner.