JAVA-18131 Adjust core-java-jvm PrintClassLoaders to sync with article (#13780)

This commit is contained in:
Anastasios Ioannidis 2023-04-07 19:03:05 +03:00 committed by GitHub
parent c5cf69e1ad
commit 57ad9ed32e
1 changed files with 3 additions and 0 deletions

View File

@ -1,5 +1,7 @@
package com.baeldung.classloader;
import java.sql.DriverManager;
import java.util.ArrayList;
public class PrintClassLoader {
@ -7,6 +9,7 @@ public class PrintClassLoader {
public void printClassLoaders() throws ClassNotFoundException {
System.out.println("Classloader of this class:" + PrintClassLoader.class.getClassLoader());
System.out.println("Classloader of DriverManager:" + DriverManager.class.getClassLoader());
System.out.println("Classloader of ArrayList:" + ArrayList.class.getClassLoader());
}