public static boolean checkDir(final File f){
  return f.exists() && f.isDirectory();
}

public static boolean checkDir ( final File f ) { return f . exists ( ) && f . isDirectory ( ) ; }
checks to see if the given file exists and is a directory .
