Java Thread getContextClassLoader() methodThe getContextClassLoader() method of thread class returns the context ClassLoader for the thread. SyntaxReturnIt returns the context ClassLoader for the Thread. ExceptionSecurityException: If the current thread cannot get the context ClassLoader. ExampleTest it NowOutput: Context ClassLoader = jdk.internal.loader.ClassLoaders$AppClassLoader@7c53a9eb Parent = jdk.internal.loader.ClassLoaders$PlatformClassLoader@ed17bee Class = class jdk.internal.loader.ClassLoaders$AppClassLoader Thread is running Next TopicMultithreading Java |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India