Java experience test

Fullname *

Email *

When does Java GC perform minor GC?

What is correct about tracing garbage collection and automatic reference counting?

truefalse
The time which garbage is collected is more predictable in automatic reference counting than in tracing garbage collection.
Tracing garbage collection relies on reference count to know which objects are garbage.
Tracing garbage collection traces reachable objects from GC roots and clean up unreachable objects.
Automatic reference counting can clean up garbages which have circular reference.
Tracing garbage collection can clean up garbages which have circular reference.

What is the difference between value type and reference type?

What is correct about interface and abstract class?

truefalse
Interface is a public contract of any classes that implement it
Interface is used to abstracting away the implementation details of classes
Interface can can contain the implementation of methods.
Abstract class can only contain method prototypes and can not contain any field or implementation of method.

What is correct about JVM?

truefalse
JVM is an abstract machine to execute java bytecode.
JVM can only execute bytecode which is compiled from java code.
JVM is a virtual machine to compile java code to java bytecode.
There is only one JVM which is provided by Oracle.

What is the purpose of string interning?

Why is string immutable?

Why string behaves like a value type while it’s an reference type?

How does generics work in Java? Why can’t value type be generic parameter?

Database connection pool …

Thread pools …