0 votes
in JAVA by
Which method is used to read a line of text from the standard input in Java?

a) System.in.read()

b) System.in.read(buffer)

c) System.console().readLine()

d) Scanner.nextLine()

1 Answer

0 votes
by

Answer: d) Scanner.nextLine()

Explanation: The Scanner class is used to read input from the standard input in Java, and the nextLine() method is used to read a line of text.

...