Newbie here. I have the following simple program. The readChar() method, which reads in character values and returns the integer equivalent, is located in the tio package being imported. Yet the compiler keeps telling me:
cannot resolve symbol
symbol: method readChar ()
location: class charToInt
int_equiv = readChar();
Here is my program:
____________________________________
import tio.*;
class charToInt {
public static void main (String[] args) {
int int_equiv;
System.out.println("Type in characters followed by
ENTER. The computer will print the integer
equivalents. To quit, hit Ctrl-Z.");
int_equiv = readChar();
while (int_equiv != -1) {
System.out.println((char) int_equiv + "is " +
int_equiv + " in integer notation.");
int_equiv = readChar();
}
}
}
THANKS!!!!!!!!
cannot resolve symbol
symbol: method readChar ()
location: class charToInt
int_equiv = readChar();
Here is my program:
____________________________________
import tio.*;
class charToInt {
public static void main (String[] args) {
int int_equiv;
System.out.println("Type in characters followed by
ENTER. The computer will print the integer
equivalents. To quit, hit Ctrl-Z.");
int_equiv = readChar();
while (int_equiv != -1) {
System.out.println((char) int_equiv + "is " +
int_equiv + " in integer notation.");
int_equiv = readChar();
}
}
}
THANKS!!!!!!!!