MCQ
Which of the following constructors is used to read from the keyboard by Scanner object?
  • Scanner Kbinput = new Scanner(System.in);
  • B
    Scanner Kbinput= Scanner (System.in);
  • C
    Scanner Kbinput = System.in
  • D
    None of these

Answer

Correct option: A.
Scanner Kbinput = new Scanner(System.in);
Scanner Kbinput = new Scanner(System.in);

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free