The variable on the left of the = is type char.
The value on the right of the = is a String.
Those types are not compatible for an assignment.
Change the variable on the left to a String.
Type: Posts; User: Norm
The variable on the left of the = is type char.
The value on the right of the = is a String.
Those types are not compatible for an assignment.
Change the variable on the left to a String.
The if statement's condition need to be enclosed in ()s. The () must surround ALL of the sub conditions.
F:\PrimeNumber.java:41: error: cannot find symbol
again = kbd.charAt(0);
^
symbol: method charAt(int)
location: variable kbd of type Scanner
The Scanner class...
Please copy the full text of the error messages and paste it here.