I have two types of Strings. One is "abcdEfgh" and "abcd efgh". That means first String is having upper case letter in between and second string is having white space. So now how do I check these two pattern string in java and make two strings.
String givenString;
if (givenString.equals("abcdEfgh")) {
String str1 = abcd;
String str2 = Efgh;
} else (givenString.equals("abcd efgh") {
String str1 = abcd;
String str2 = efgh;
}
Please provide the solution Thanks
givenString.split(" ");for the white space example.