String to int *not allowed to use Integer
I am trying to convert a binary number that enters the method as a string, I have to do the actual conversion within the same method, and it returns as an int. Right now I was thinking of running a loop and pulling out each character one by one as a character, but seeing as I have been away from java (and programming in general) for awhile I find myself stuck. The binary number is to be entered in 16bits so I will need to be able to ignore all the zeros before the first 1. I am not allowed to use any classes such as Integer.