concept ClassLoader in category java

This is an excerpt from Manning's book The Java Module System.
To load a resource, you call
getResourceorgetResourceAsStreamon eitherClassorClassLoader. Conceptually, these methods are almost identical: you hand them the name of a resource file as aString, and they return aURLorInputStreamif they find it; otherwise you getnullback. To not make things more complicated than they have to be, we’ll stick to usingClass::getResource.
You can access the application class loader by calling
ClassLoader.getSystemClassLoader()or by callinggetClass().getClassLoader()on an instance of one of your classes. Both methods promise to give you an instance of typeClassLoader. On Java 8 and before, the application class loader is aURLClassLoader, a subtype ofClassLoader; and becauseURLClassLoaderoffers some methods that can come in handy, it’s common to cast the instance to it. You can see an example of that in listing 6.1.