import java.util.Scanner;
class main
{ public static void main(String[] args)
{
Scanner s =new Scanner(System.in);//Initializing scanner
System.out.println("Your Answer: ");
char ans = s.nextChar();//it is showing cannot identify symbol
}
}
Is there any problem with the code? I am getting an error 'cannot find symbol' 'method nextChar();'