Java Threads Question:

Download Job Interview Questions and Answers PDF

What is a green thread?

Java Threads Interview Question
Java Threads Interview Question

Answer:

A green thread refers to a mode of operation for the Java Virtual Machine (JVM) in which all code is executed in a single operating system thread. If the Java program has any concurrent threads, the JVM manages multi-threading internally rather than using other operating system threads.

There is a significant processing overhead for the JVM to keep track of thread states and swap between them, so green thread mode has been deprecated and removed from more recent Java implementations. Current JVM implementations make more efficient use of native operating system threads.

Download Java Threads Interview Questions And Answers PDF

Previous QuestionNext Question
Which class is the wait() method defined in?What is a working thread?