+ 1
ScannerObject.next().CharAt(0) what is 0
2 Réponses
+ 2
ScannerObject.next() will accept string as input.
charAt(int index) is a predefined method of String class which extracts the character at index passed in arguement from string. Index start from 0. so, charAt(0) will extract the first character of the string that has been accepted by ScannerObject.next()..
+ 1
thanks