Wednesday, 29 February 2012

Java Interview Questions: – Can you explain the many types of Advice?

Before advice
  • Advice that executes before a join point
  • does not have the ability to prevent execution flow proceeding to the join point
After returning advice
  • Advice to be executed after a join point completes normally
After throwing advice
  • Advice to be executed if a method exits by throwing an exception
After advice
  • Advice to be executed regardless of the means by which a join point exits
Around advice
  • Advice that surrounds a join point such as a method invocation
  • It is also responsible for choosing whether to proceed to the join point
See the following video on Spring: -



Click for more Java interview questions

Regards,

Visit for more author’s blog on Java interview questions

Saturday, 25 February 2012

Java/J2EE Design Pattern Interview Questions: – 20 Basics interview questions on Java/J2EE Design Patterns?

We are putting forward 20 basic Java/J2EE design pattern Interview questions. Hope every one benefits. Normally the Java/J2EE design pattern interviewer starts with...
  • Explain how J2EE design patterns are classified?
  • What is Front Controller pattern?
  • What is Intercepting Filter pattern?
  • What is Composite View pattern?
  • What is View Helper pattern?
  • What is Dispatcher?
  • What is Service to Worker pattern?
  • What is Service Locator pattern?
  • What is Business Delegate pattern?
  • What is Session Façade pattern?
  • What is EJB Command pattern?
  • What is Value Object pattern?
  • What is Value Object Assembler pattern?
  • What is Data Access Object pattern?
  • What is Version Number pattern?
  • What is the application of business objects?
  • Why transfer objects(TO) are not used to store state in business objects(BO)?
  • Is Service Locator still be used in EJB 3?
  • What is the use of Transfer objects(TO)?
  • What is the use of TO Assembler?
See the following video on Batch Processing in Hibernate: -



Click for more Java/J2EE Design Pattern interview questions

Regards,

Visit for more author’s blog on Java/J2EE Design Pattern interview questions

Wednesday, 22 February 2012

Java Interview Questions: - How will you explain EAR, JAR and WAR file?

Following is the differences between EAR, JAR and WAR file asked during Java Interview Questions.

JAR: - EJB modules which contains enterprise java beans class files and EJB deployment descriptor are packed as JAR files with .jar extension

WAR: - Web modules which contains Servlet class files, JSP FIles,supporting files, GIF and HTML files are packaged as JAR file with .war( web achive) extension

EAR: - All above files(.jar and .war) are packaged as JAR file with .ear ( enterprise archive) extension and deployed into Application Server

SAR (Service ARchive): -  It provides a service.xml file and accompanying JAR files. And used in case of SOA

APK (Android Application Package):- A variant of the Java archive format, is used for Android applications

See the following video on Java - Inheritance between beans and spring asked during java Interview:



Click for more Java interview questions

Regards,

Visit for more author’s blog on Java interview questions

Saturday, 18 February 2012

Java Interview Questions: - Mention the life-cycle phases of JSF (Java Server Faces)?

Following is the brief Life-cycle phases of JSF (Java Server Faces) asked during Java interview questions.

Restore View : A request comes through the FacesServlet controller. The controller examines the request and extracts the view ID, which is determined by the name of the JSP page.

Apply request values: The purpose of the apply request values phase is for each component to retrieve its current state. The components must first be retrieved or created from the Faces Context object, followed by their values.

Process validations: In this phase, each component will have its values validated against the application's validation rules.

Update model values: In this phase JSF updates the actual values of the server-side model, by updating the properties of your backing beans.

Invoke application: In this phase the JSF controller invokes the application to handle Form submissions.
Render response: In this phase JSF displays the view with all of its components in their current state.

See the following video by using String or String Buffer performance increases asked during java Interview: -



Click for more Java interview questions

Regards,

Visit for more author’s blog on Java interview questions

Tuesday, 14 February 2012

Java Interview questions: -Show difference between SAX Parser and DOM Parser?

Following is the difference between SAX Parser and DOM Parser asked during Java interview questions.

SAXDOM
Event based processingTree based processing
Traversing only from top to bottom that too onceTraversing can be in any direction and any number of times
Document content cannot be modified in SAXDocument content can be modified in DOM
A SAX parser serves the client application always only with pieces of the document at any given timeA DOM parser always serves the client application with the entire document no matter   how much is actually needed by the client
More space efficient in case of a big input documentis space inefficient when the document is huge

See the following video on String Literal Pool asked during java Interview:-



Click for more Java interview questions

Regards,

Visit for more author’s blog on Java interview questions

Friday, 3 February 2012

Java interview questions: - Mention blocking Queues?

Following classes are blocking Queues in Java interview questions.

The java.util.concurrent package contains a set of synchronized Queue interfaces and classes. Blocking Queue extends Queue with operations that wait for the queue to become nonempty when retrieving an element and for space to become available in the queue when storing an element. This interface is implemented by the following classes:-
  • Linked Blocking Queue — an optionally bounded FIFO blocking queue backed by linked nodes
  • Array Blocking Queue — a bounded FIFO blocking queue backed by an array
  • Priority Blocking Queue — an unbounded blocking priority queue backed by a heap
  • Delay Queue — a time-based scheduling queue backed by a heap
  • Synchronous Queue — a simple rendezvous mechanism that uses the Blocking Queue interface
See the following video on Java - Getting started with spring: -



Click for more Java interview questions

Regards,

Visit for more author’s blog on Java interview questions