Explain the Linking of Java Programs.
Advertisements
Question
Explain the Linking of Java Programs.
Explain
Advertisements
Solution
Linking of Java Programs is the process of connecting the compiled Java bytecode with the required classes and libraries during program execution. It is performed by the Java Virtual Machine (JVM) after the required classes are loaded into memory.
The linking process mainly involves three stages:
- Verification: The JVM checks the bytecode to ensure that it is valid and follows Java's security rules.
- Preparation: Memory is allocated for static variables, and they are assigned their default values.
- Resolution: Symbolic references to classes, methods and fields are converted into direct references.
shaalaa.com
Is there an error in this question or solution?
Chapter 6: Variables and Expressions - EXERCISE [Page 131]
