GeekInterview.com
Answered Questions

Will there be a performance penalty if you make a method synchronized? If so, can you make any design changes to improve the performance

Asked By: Interview Candidate | Asked On: Jul 25th, 2005

Star Read Best Answer

Editorial / Best Answer

Answered by: Faisal Ghauri

Answered On : Jul 24th, 2005

Performance does take a hit when using synchronization. I think the way to reduce this hit is to synchronize only a block of code that will be accessed by threads and not synchronize the entire method. 
 

Answered by: sumeesudha on: Feb 5th, 2010

There is degradation in performance when you make a method synchronized.  Even when a program contains only a single thread running on a single processor, a synchronized method call is still slow...

Answered by: sripatnaiky on: Feb 4th, 2010

The Synchronization may be useful in avoiding the deadlock, helpful in maintaining the consistent object state etc,. Only one thread will be accessed at a time by acquiring lock on the synchronized bl...

What do you like most with ant

Asked By: Interview Candidate | Asked On: Aug 23rd, 2005

Answered by: koti.tirumala on: Jan 5th, 2012

Memory leaks are caused by writting poor program design where Object reference are long lived and the garbage collector is unable to reclaim those objects..

Answered by: javagek on: Aug 27th, 2011

I guess the best thing about ANT is that it's easier to learn and works cross platform and cross programming language - which is a real bonus.

Explain servlet and JSP life cycle

Asked By: Interview Candidate | Asked On: Sep 1st, 2005

Answered by: nalindascjp on: Mar 4th, 2010

A Servlet is a Java class which faclitates a web developer to write dynemic web pages. JSP is the presentation componant that used with Servlets to make a page dynamic. Generally a JSP is a HTML docum...

Answered by: sripatnaiky on: Feb 4th, 2010

Life cycles are pretty same, as the JSP will be translated into a servlet during the translation phase, the important point to be considered here is if we include another JSP by making use o...

Interview Question

 Ask Interview Question?

 

Career Counselling

 Have Career Question?

 Ask Chandra

 Ask Only Career questions.

Follow us: