write the syntax with the reference of the java programming to create a scanner object.
Answers
Answered by
1
Answer:
char <variable name> = <Scanner Object>. next(). charAt(0);
Scanner in = new Scanner(System. in); char ch = in. next(). charAt(0);
import java.util.Scanner; class RunTimeError { public static void main(String args[]) { Scanner in = new Scanner(System. in); System. out. print("Enter a number: "); int n = in.
Similar questions