1) JDK,JRE and JVM?
JVM
- Java Virtual Machine , which provides the runtime environment in which java bytecode can be executed.
- JVMs are available for many hardware and software platforms
- JVM is platform dependent.
JRE
- JRE - Java Runtime Environment.
- Implementation of JVM.
JDK
- JDK - Java Development Kit.
- It contains JRE + development tools.
2) Types of memory areas in JVM?
- Class Area
- Heap
- Stack
- Program Counter Register
- Native Method Stack
3) JIT compiler?
Just-In-Time - compiles parts of the byte code that have similar functionality at the same time,
hence reduces the amount of time needed for compilation.
hence reduces the amount of time needed for compilation.
4) What gives Java its 'write once and run anywhere' nature?
Its bytecode. Java is compiled to be a byte code which is the intermediate language between source code and machine code. This byte code is not platform specific and hence can be fed to any platform.
5) Classloader?
Cassloader is a subsystem of JVM that is used to load classes and interfaces.T
Types of classloaders
Types of classloaders
- Bootstrap classloader
- Extension classloader
- System classloader
- Plugin classloader
6) The local variables are not initialized to any default value, neither primitives nor object references.
7) What if you save a program with .java i.e. without any name ?
Yes , its correct
Javac .java
Java NameOfClass.java
No comments:
Post a Comment