what is the method that allows reading numeric value as input?
Answers
Answered by
1
Answer:
Scanner sc=new Scanner(System.in);
The above statement creates a constructor of the Scanner class having System.inM as an argument. It means it is going to read from the standard input stream of the program. The java.util package should be import while using Scanner class.
It also converts the Bytes (from the input stream) into characters using the platform's default charset
Similar questions