Scanner class can be used to for performing which of the following operations ? (a) accept input from the keyboard
(b) read from the file(c) parse a string separated by delimiters
(d) All of the above
Answers
Answered by
5
All the above options are correct....
HuneyRock:
hii
Answered by
1
Answer:
Scanner class is used for accepting input from keyboard, reading from the file, parsing a string separated by delimiters.
Correct answer: Option (d)
Explanation:
For obtaining input of the primitive types of integer, string, double etc., scanner class is java.util package is used. Objects of scanner class are created using System.in.
Different operations can be performed like accepting input from the keyboard, reading from the file by passing object of a class File, and parse a string separated by delimiters. Parsing a string implies splitting the string into smaller parts based on some rules typically using delimiters which are characters.
Similar questions
Science,
8 months ago
Social Sciences,
8 months ago
Math,
8 months ago
Computer Science,
1 year ago
Chemistry,
1 year ago
Social Sciences,
1 year ago
Science,
1 year ago