System.out.println("Thanks for playing the Hi-Low guessing game.");
ans=Console.readChar("Would you like to play again? (y/n)");
}while (ans=='y');
}
}
}

The error reads readInt() in console cannot be applied to (java.lang.String)
I am very new to java, so please explain in detail.

12-07-2008, 03:44 AM

CJSLMAN

Console?

What is Console? It hasn't been define o stated in the porgram.

CJSL

12-07-2008, 03:46 AM

bige15

console

import java.io.*;

/** The <B>Console</B> class consists of static methods that allow easy reading
of the basic data types <TT>double</TT>, <TT>int</TT>, and <TT>String</TT>
from standard input. <I>It must be placed in the same directory containing
the source code using it.</I><P>

public class Console
{
/** Reads a single double value from the keyboard. If there is an error, the
program will halt.
@return double
*/
public static double readDouble()
{
String tmpX = readString().trim();