Computer Science, asked by kapilkashyap126, 3 days ago

method that accept string without any space is​

Answers

Answered by nehasolai4
18

Answer:

next()

Explanation:

Hope it helps!!

Answered by rahul123437
0

Method that accept string without any space is​ next()

Explanation:

  1. next() method in java is present in the Scanner class and is used to get the input from the user.
  1. A Scanner object must be constructed before this method can be used. This method can only read the input till it encounters a space(“ “).
  2. 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.
  3. Even if a previous iteration of has Next() returned true, this function may block while waiting for input to scan.charAt(0).
  4. 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