1. Characteristics of Java
- Platform Independece
- The Java compiler translates source code into bytecode, which can run on any system equipped with a JVM.
- Object Oriented
- Everything in Java is an object.
- Class, Object, Inheritance, Polymorphism, Encapsulation
- Memory Management
- Has garbage collection mechanism, which automatically manages memory and reclaims objects that are no longer in use.
- After compilation, Java generates a .class file, known as a bytecode file.
- JVM translates the bytecode into machine code specific to the taret platform and then executing it.
3. Relationship of JVM, JDK, JRE?

JVM
- Responsible interpreting or compiling Java bytecode (generated by the Java compiler) into machine code.
- Execute the program.
- Provide features such as memory management, garbage collection.
JRE
- Is the minimum environment required to run Java programs.
- Include the JVM and a set of Java class libraries to support the execution of Java programs.
- Does not include tools for compileing or developing Java code and only provides the runtime environment needed to execute Java programs.
JDK
- A collection of tools required for developing Java programs.
- Includes the JVM, compiler (javac), debugger (jdb), Java standard library
- Provide all the tools and environments needed for developing, compiling, debugging, and running Java programs.
4. Difference between Java and Python
- Java is a compiled programming language where the Java compiler translates source code into bytecode, which is then executed by the JVM.
- Python is an interpreted language where translation occurs simultaneously as the program is executed.