How can we detect a whitespace in between a string in java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How can we detect a whitespace in between a string in java?

if any one has done such type of program please post it.

6th Sep 2017, 10:29 AM
Waseem Siddiqi
Waseem Siddiqi - avatar
3 Answers
+ 2
done removed c++
6th Sep 2017, 10:38 AM
Waseem Siddiqi
Waseem Siddiqi - avatar
+ 1
(If you only need Java answer, you should remove the c++ tag)
6th Sep 2017, 10:33 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar
+ 1
I may convert the string to chararray and check if array[i] == ' '.
6th Sep 2017, 2:18 PM
Ran
Ran - avatar