public static boolean isVariable(String s){
  for (int i=0; i < s.length(); i++) {
    if (!Character.isUpperCase(s.charAt(i))) {
      return false;
    }
  }
  return true;
}

public static boolean isVariable ( String s ) { for ( int i = 0 ; i < s . length ( ) ; i ++ ) { if ( ! Character . isUpperCase ( s . charAt ( i ) ) ) { return false ; } } return true ; }
check if we have a variable , as they are uppercase strings .
