method that accept string without any space is
Answers
Answered by
18
Answer:
next()
Explanation:
Hope it helps!!
Answered by
0
Method that accept string without any space is next()
Explanation:
- next() method in java is present in the Scanner class and is used to get the input from the user.
- A Scanner object must be constructed before this method can be used. This method can only read the input till it encounters a space(“ “).
- This scanner's next() method locates and returns the next full taken. Input that meets the delimiter pattern comes before and after a complete taken.
- Even if a previous iteration of has Next() returned true, this function may block while waiting for input to scan.charAt(0).
- next() function returns the next taken/word in the input as a string and charAt(0) function returns the first character in that string.
Similar questions
Political Science,
1 day ago
Chemistry,
1 day ago
Math,
3 days ago
English,
3 days ago
History,
8 months ago