Class Loader Sub System in Java | Java Online Training
This Java Online Training “Class Loader Sub System in Java” is providing how to define a class with API class name and how to access duplicate classes from different packages and about Class Loader Sub System in Java.
Can we define a class with the same name of java-API class?
- Yes allowed.
- Pre-defined class belongs to pre defined packages.
- User defined packages belongs to user packages.
- In java programming, it is allowed to defined same class in different packages and can be accessed using Fully Qualified Name.
- Class loader sub system is the pre-defined program.
- It loads the required class files into JVM
- It gives first priority to Current Working Directory (local drive).
- If class is not present in CWD, then it searches in API.
User defined System class
public static void main(String args)
//System.out.println("Hello World!"); //Error :
- Once we practiced above application, please delete System related files.
- if not deleted, every time it collects the information of System class from local drive.