Do you mean this:
if (newStr4.startsWith("Mon") || newStr4.startsWith("Tues") || ...)
Or you could use regular expression:
if (newStr4.matches("(Mon|Tues|Wed|Thurs|Fri).*"))
More Related Contents:
- Test if a string contains any of the strings from an array
- Java String – See if a string contains only numbers and not letters
- How to remove large if-else-if chain [duplicate]
- How is String in switch statement more efficient than corresponding if-else statement?
- Write a function that will sort a string array using Java
- String class replace() method [closed]
- Why is my if statement an error?
- How to sort an array of objects in Java?
- How can non-ASCII characters be removed from a string?
- How to capitalize the first letter of a String in Java?
- Fastest way to iterate over all the chars in a String
- Using Enum values as String literals
- How does Java store Strings and how does substring work internally? [closed]
- Java String.indexOf and empty Strings
- How to get data from each dynamically created EditText in Android?
- Why does String.hashCode() in Java have many conflicts? [closed]
- Use Java and RegEx to convert casing in a string
- Validating IPv4 string in Java
- Difference between String trim() and strip() methods in Java 11
- What’s the best way to check if a String contains a URL in Java/Android?
- What’s the quickest way to compare strings in Java?
- Random element from string array [closed]
- Replace Last Occurrence of a character in a string [duplicate]
- Compare two hex strings in Java?
- What is a Java String’s default initial value?
- Hints for java.lang.String.replace problem? [duplicate]
- How to convert a Java String to an ASCII byte array?
- What is difference between mutable and immutable String in java
- Why does byteArray have a length of 22 instead of 20?
- Behavior of String literals is confusing