public class CheckCharCase { public static void main(String[] args) { System.out.println("" + getFirst("Hello")); //true System.out.println("" + getFirst("hello")); //false System.out.println("" + getSecond("Hello")); //true System.out.println("" + getSecond("HEllo")); //false } private static boolean getFirst(String s) { String str = "" + s.charAt(0); //get the first char of the string, put into a string return(str.equals(str.toUpperCase())); //compare and return } private static boolean getSecond(String s) { String str = "" + s.charAt(1); return(str.equals(str.toLowerCase())); } }