English

Which of the following method will accept a string by using scanner object? - Computer Applications

Advertisements
Advertisements

Question

Which of the following method will accept a string by using scanner object? 

Options

  • next()

  • next.read()

  • next.String()

  • next.char()

MCQ

Solution

next()

Explanation:

next() reads a single word (string) from the input using a Scanner object. 

shaalaa.com
  Is there an error in this question or solution?
Chapter 1.06: Input in Java - EXERCISES [Page 65]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.06 Input in Java
EXERCISES | Q I. 4. | Page 65
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×