Monthly Archives: April 2010

What is the difference between EAR, JAR and WAR file?

In J2EE, application modules are packaged as EAR, JAR and WAR based on their functionality. Each type of file (.jar, .war, .ear) is processed uniquely by application servers, servlet containers, EJB containers, etc JAR: Jar file (file with a .jar

Posted in JAVA, JSP, Servlet

Posted in Polls

ListIterator with an example

ListIterator allows the programmer to traverse the list in either direction, modify the list during iteration, and obtain the iterator’s current position in the list. A ListIterator has no current element; its cursor position always lies between the element that

Posted in JAVA

Iterator with an example

Using Iterator we can iterate only in forward direction and you cannot add elements while iterating and Here cursor always points to specific index. Example:  public class Example {   public static void main(String[] args) { ArrayList aList = new

Posted in JAVA

When to go for Sortedset

When you want to sort the data we have to go with sortedset by default the sorting order is ascending. You can customize the sorting order by Implementing comparator interface. You can use treeset for sorting and for this you

Posted in JAVA

HashSet with Example

If  our requirement is frequent insert then we go with HashSet. For efficiency objects added to a HashSet need to implement the hashCode() method in a manner that properly distributes the hash codes. While most system classes override the default

Posted in JAVA

Which is faster in execution-JSP or SERVLET ? Why?

Servlet is faster in execution as every jsp is changed on converted to servlet before starting the execution. Thus the server need to spend some time to convent a JSP file to servlet at it’s first time execution. But developing

Posted in JSP

Can we declare final method in abstract class?

If a method is defined as final then we can’t provide the reimplementation for that final method in it’s derived classes i.e overriding is not possible for that method. An abstract class contains one or mole abstract method. If all

Posted in JAVA

Can the same object os Stateless Session bean be shared by multiple clients? Can the same object os Stateful Session bean be shared by multiple clients?

It is possible to share the same object of stateless session bean by multiple clients. A Server maintains a pool of objects in case of stateless session bean. And every When ever we send a request to the JSP file

Posted in JSP

How we declare a synchronized block? What does this represent in the Declaration of sunchronized block?

When two or more threads need to access to a shared resource they need some way to ensure that the resource will be used by only one thread at a time. The process by which this achieved is called synchronization.

Posted in JAVA

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 681 other followers

April 2010
Mallikarjun Gunda

This is Mallikarjun Gunda, I am working as a software professional. Blogging is my Passion. This blog contains the posts on Java related technologies and programming languages. I am happy to share my knowledge through the blogs.

Blog Stats
  • 328,207 hits