Question: how to check if string contains uppercase in java?
Answer: If you are using Apache Commons library, you can use the isAllUpperCase method of the StringUtils class to check if the String is uppercase as given below. Note: If the string contains any non-letter characters including space, the isAllUpperCase method returns false.