The class Classhas an instance method getClassLoader()that returns a reference to the class loader, which loads the class that it represents. Please note that this may return null. See here .
So, if you want to know which classloader is loaded String(as an example), you can do:
ClassLoader loader = String.class.getClassLoader();
or
ClassLoader loader = "I'm a String".getClass().getClassLoader();