hi, i'm new to java (being studying for a few days now) and i'm stuck on the following program. it's supposed to bring up a screen and ask me to input a number...but it always say there's something wrong with the line userInput = TextIO.getInt();
. can anyone help me out...thanks
here it is;
public class PrintSquare {
public static void main(String[] args) {
// A program that computes and prints the square
// of a number input by the user.
int userInput; // the number input by the user
int square; // the userInput, multiplied by itself
System.out.print("Please type a number: ");
userInput = TextIO.getInt();
square = userInput * userInput;
System.out.print("The square of that number is ");
System.out.println(square);
} // end of main()
} //end of class PrintSquare