java.lang.Class.getName()


java.lang.Class.getName()

package com.codingdict;



import java.lang.*;



public class ClassDemo {



   public static void main(String[] args) {



      // returns the Class object associated with this class

      ClassDemo cl = new ClassDemo();

      Class c1Class = cl.getClass();



      // returns the name of the class

      String name = c1Class.getName();

      System.out.println("Class Name = " + name);

   }

}