
please tel me the syntax of system.in

Java System.in
class InputCharacter
{
public static void main(String[] args) throws Exception
{
System.out.print("Enter a character: ");
int i=System.in.read();
char ch=(char) i;
System.out.println("you have enetered: "+ch);
}
}

class InputCharacter { public static void main(String[] args) throws Exception { System.out.print("Enter a character: "); int i=System.in.read(); char ch=(char) i; System.out.println("you have enetered: "+ch); } }
re there other ways for this
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.