The input is "1 true 34 hi"
And Answer is hits ssssibis2.
are you sure this is what you are getting at your side ,
When I complied the above program , I got the following output :
Entering the First Condition
Entering the Second Condition
Hits si
The final result is "si"..
and about "space" , the scanner class acts as :
A Scanner breaks its input into tokens using a delimiter pattern, which by default matches whitespace. The resulting tokens may then be converted into values of different types using the various next methods.