public static boolean hasStartingSlash(String path){
  return path.charAt(0) == '/';
}

public static boolean hasStartingSlash ( String path ) { return path . charAt ( 0 ) == '/' ; }
determines of path starts with a slash .
