I have almost completed this code, but it has told me that There is an illegal modifier in the public static int power; line. Can you guys please help?
public static int binToDec(int i)
{
int[] numbers;//initialize variable
int f = 4;
String iString = "" + i;
int result = 0;
int length = iString.length();
public static int power;
for(power = iString.length(); power>=0;power--)
{
while(f == length && f >= 0)
{
numbers[power] = iString.charAt(power)^power;
}
length--;
f--;
}
for(int g = 0; g <= numbers.length; g++)//double check constraints
{
result = numbers[g] = numbers[power];
}
return result;
}