if(newStr4.startsWith("Mon") || newStr4.startsWith("Tues") || newStr4.startsWith("Weds") .. etc)
You need to include the whole str.startsWith(otherStr) for each element, since || only works with boolean expressions (true or false).
There are other options if you have a lot of things to check, for example regular expressions , but they are usually slower and harder expressions are usually harder to read.
An example of a regular expression to define abbreviations for the day name:
if(Pattern.matches("Mon|Tues|Wed|Thurs|Fri", stringToCheck)) {
Brendan Long Mar 20 '12 at 16:14 2012-03-20 16:14
source share