Consultancy Services jobs Etisalat CEO ZANTEL
etisalat

Custom Search
Share/Save/Bookmark Subscribe

Core Java Faq - part 2

Posted by Anonymous | 4:12 PM | | 0 comments »

CORE JAVA faqs - part 2

Etisalat

DEVELOPER

bangalore

india

BLOGGER

SEX






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.

41. What is the difference between pre-emptive multi-tasking and co-operative multi-tasking?

In case of pre-emptive multitasking, the program is interrupted without consulting first where as in case of co-operative multitasking; programs are interrupted only when they are willing to yield control.Windows 95,NT – pre-emptive multi-tasking where Windows 3.1 is co-operative multitasking. Pre-emptive multi-tasking is more effective as compared co-operative multitasking.

42. What is difference between creating a thread by extending Thread class and implementing Runnable?

Explain the four different states of a thread The four different states of a thread are New: When a thread is created with new operator .It is not yet running.Runnable: Once you invoke the start method on the thread it becomes runnable. It is up to the OS to decide when to give time to the thread to run. A runnable thread may or may not be running.Blocked : Thread enters this state under the following condition. Someone calls sleep () on the thread.Thread calls an operation that blocks on input/output.Thread calls wait() method.Thread tries to lock an object that is currently locked by another thread.Dead : The Thread is dead for one of two reasons.It dies a natural death because the run method exits normally.It dies abruptly because an uncaught exception terminates the run method.

43. What happens when there are more than one highest priority threads having same priority?

In that case only one of the thread is picked up. It is up to the thread Scheduler to arbitrate between threads of same priority.There is no guarantee that all the same priority threads will be fairly treated.

44. Why do threads block on I/O ?

Threads block on I/O so that other threads may execute while the I/O operation is performed.

45. What are the methods which can only be called from within a Synchronized method or block ?

Notify (): unblocks one randomly selected thread among the threads that called wait() on this object.NoitifyAll() : unblocks the threads that called wait() on this object.Wait (): causes the thread to wait until it is notified.46. What is the difference between yield and sleep methods of Thread?When a task invokes its yield () method, it returns to the ready state. When a task invokes its sleep () method, it returns to the waiting state.

0 comments

free counters
Your Ad Here

Cross Rates Powered by Forex Pros - The Forex Trading Portal.
java.sun.com jobs etisalat actress hot sex
Bangalore, 04 March 2008, UAE Telecoms Gaint founds ‘technologia’ in Bangalore to create continuous stream of new innovations. Affordable Website Design
Free Search Engine Submission
Free Search Engine Submission
Submit Your Site To The Web's Top 50 Search Engines for Free! BigDirectory.org - free url submission, online website directory National Directory Free Web Directory Submission - Dotster Directory Link Popularity Building
We offers advanced Link Popularity Services for small to large static, dynamic and eCommerce websites.
http://www.links-builder.com
India Search Engine and Web Directory Superblog Directory
HOT SEX,NUDE TECHNOLOGIAWORLD SQL JAVA SUN BEA IBM HCL SATYAM TCS CHIRANJEEVI CHIRU PAWAN HANSIKA SANGAVI SNEHA TAMIL SEX MALLU MASALA