if(str.compareTo(str.toLowerCase())!=0) { // do this if the string is not lower case } else { // do this if string is lower case }