Re: <strong>!_NEWLINE_!Error processing octal integer Color codes passed as parameters.!_NEWLINE_!</strong>
Posted By:
Bogdan_Sheptunov
Posted On:
Monday, August 27, 2001 06:39 AM
The keyword for you is Integer.decode(). Here is some sample code:
String hexValue = "0x11";
Integer decodedInt = null;
int result = 0;
try
{
decodedInt = Integer.decode(hexValue);
}
catch (NumberFormatException e)
{
System.out.println("Cannot convert '" + hexValue + "': " + e.getMessage());
}
if (decodedInt != null)
{
result = decodedInt.intValue();
}
System.out.println(result); // prints out 17