Sunday, March 30, 2008

CORE JAVA FAQS

36. What happens during Resolution Phase?

Resolution is the process of locating classes, interfaces, fields, and methods referenced symbolically from a types constant pool, and replacing those symbolic references with direct references.

37. How the initialization of class is is different from initialization of interface?

Initialization of class requires initialization of its super classes but initialization of interfaces doesn’t require initialization of it super interfaces.

38. What is a JIT compiler?

JIT compilers are used to convert the java byte codes to native types on the fly.


39. What is the difference between instance method and class method ?

· Instance methods require an instance before they can be invoked; class methods do not.
· Instance methods use dynamic (late) binding; class(static methods) methods use static (early) binding.

40. What is the difference between a process and Thread?

A process is a self-contained running program within its own address space while a Thread is a single sequential flow of control within a process.

Each process has its own set of variables where as Threads share the same data.

Inter-process communication is much slower and restrictive as compared to inter-thread
communication is faster.

Creating and destroying Thread is much cheaper in terms of performance overhead as compared to launching a new process.

0 comments: