Originally posted by may tan: i know i need to use the method pow() for multiplier. But i'm not very sure what to be types inside..
You could use the Math.pow() method for this, but that's seems to complicate the issue, in my opinion. Because then you have to get around the messiness of getting numeric values you could multiply by the value returned by Math.pow().
You could create a method that converts the color band Strings into integers (i.e. "red" returns 2). You could put those returned values into a StringBuffer. For the multiplier band, you could add zeros to the StringBuffer based on the integer value (i.e. for 5 add five zeros).
Convert the StringBuffer to a String and you are done.
Certainly not the only way you could do it, but the simplest I can think of this late at night.
Wannabe SCJP 1.4<br /> <br />It wasn't raining when Noah built the ark.<br /> --Howard Ruff