public static String extractLastName(String qualifiedName){
  int i=qualifiedName.lastIndexOf('.');
  if (i == -1)   return qualifiedName;
  return qualifiedName.substring(i + 1);
}

public static String extractLastName ( String qualifiedName ) { int i = qualifiedName . lastIndexOf ( '.' ) ; if ( i == - 1 ) return qualifiedName ; return qualifiedName . substring ( i + 1 ) ; }
given a qualified name , extract the last component . if the input is not qualified , the same string is answered .
