How can I check to see if a String contains a whitespace character, an empty space or \" \". If possible, please provide a Java example.
For example: String
String
You can use charAt() function to find out spaces in string.
public class Test { public static void main(String args[]) { String fav="Hi Testing 12 3"; int counter=0; for( int i=0; i