public static java.lang.Class forName(java.lang.String className) throws java.lang.ClassNotFoundException {
  className=className.replace('$','.');
  Class c=forNameImpl(className);
  if (c == null) {
    throw new ClassNotFoundException(className);
  }
  return c;
}

public static java . lang . Class forName ( java . lang . String className ) throws java . lang . ClassNotFoundException { className = className . replace ( '$' , '.' ) ; Class c = forNameImpl ( className ) ; if ( c == null ) { throw new ClassNotFoundException ( className ) ; } return c ; }
returns the class object associated with the class with the given string name . given the fully - qualified name for a class or interface , this method attempts to locate , load and link the class . for example , the following code fragment returns the runtime class descriptor for the class named java . lang . thread : classt = class . forname ( " java . lang . thread " )
