हिंदी

Explain the following function: nextLine(); - Computer Applications

Advertisements
Advertisements

प्रश्न

Explain the following function:

nextLine();

संक्षेप में उत्तर

उत्तर

The Scanner object's nextLine() method reads the complete input line of text. It accepts the string, including spaces.

Syntax:

Scanner ob = new Scanner(System.in); 
String s = ob.nextLine();
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1.06: Input in Java - EXERCISES [पृष्ठ ६६]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 1.06 Input in Java
EXERCISES | Q III. 5. | पृष्ठ ६६
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×