hey guys new to the forum and java. I am taking a java class and can seem to figure out how to fix this error below is my code any help is appreciated. i have to imput a binary number and have the decimal, ascii and result of decimal subtracted from 256 on 3 separate lines
import java.util.Scanner; import java.lang.Integer; public class Binary { public static void main(String[] args) { Scanner in = new Scanner (System.in); // enter binary int b = in.nextint(); // convert to decimal int decimalValue = Integer.parseInt(b, 2); // output decimal System.out.println(decimalValue); // add ascii output //add subtraction output } }
i keep getting the following when i try to compile
Binary.java:8: cannot find symbol
symbol : method nextmethod()
location: class java.util.Scanner
int b = in.nextmethod();
^
Binary.java:10: cannot find symbol
symbol : method parseInt(double,int)
location: class java.lang.Integer
int decimalValue = Integer.parseInt(b, 2);
^
2 errors
any help is appreciated thank you and i look forward to a response this is driving me nuts.