Tuesday, 12 August 2014

Full qualified name of the class

You can get the full qualified name of a class using 'getName' method of class java.lang.Class.

import java.util.concurrent.AbstractExecutorService;

public class QualifiedName {
    public static void main(String args[]){
        Class myClass = AbstractExecutorService.class;
        System.out.println(myClass.getName());
    }
}

Output
java.util.concurrent.AbstractExecutorService


                                                             Home

No comments:

Post a Comment