Domanda di colloquio di Personal Capital

Difference between process/thread, heap/stack. What is JIT?

Risposte di colloquio

Anonimo

18 dic 2017

It compiles the bytecode into platform-specific executable code

Anonimo

18 dic 2017

JIT - It compiles the bytecode into platform-specific executable code . Heap vs Stack Heap space is used by java to allocate memory to Objects and JRE classes. all objects are created in the Heap space. Stack memory is used for execution of a thread. Every thread will have its own stack. Stack contains method specific values - local variables, that are short-lived and references to other objects in the heap that are getting referred from the method. Process / Thread A program in execution is often referred as process. A thread is a subset(part) of the process. A process consists of multiple threads. A thread is a smallest part of the process that can execute concurrently with other parts(threads) of the process. Threads in same process, can communicate with each other, while process can communicate with other process using IPC