[Solved] Java (Length of an input)
Replace s.next() to s.nextLine() and you will get the desired result. next() finds and returns the next complete token from this scanner. A complete token is preceded and followed by input that matches the delimiter pattern. nextLine() returns the rest of the current line, excluding any line separator at the end. The position is set … Read more