Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

class java

public void printClassLoaders() throws ClassNotFoundException {

    System.out.println("Classloader of this class:"
        + PrintClassLoader.class.getClassLoader());

    System.out.println("Classloader of Logging:"
        + Logging.class.getClassLoader());

    System.out.println("Classloader of ArrayList:"
        + ArrayList.class.getClassLoader());
}
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #class #java
ADD COMMENT
Topic
Name
5+1 =