Java J2EE Interview Questions
Questions Answers Views Company eMail

What is garbage collection in Java, and how can it be used ?

Infosys, HCL, Accenture, Wipro, Sara, SITS, TCS,

32 56336

Differentiate Vector and ArrayList?

Wipro, Max Telecom,

6 7657

Differentiate constructor and a method and how are it be used?


7 8197

What is an abstract class?


7 6974

How can final class be used?

Wipro, Accenture,

5 8880

By what default value is an object reference declared as an instance variable?


1 10274

Java support what type of parameter passing ?


7 11521

Explain the term serialization?


10 9324

Is there is any error if you have multiple main methods in the same class?

Wipro, Infosys,

10 10712

What is Overriding and how can it be used?

Consagous, Wipro,

7 13170

How is serialization used generally ?

3 4290

How are Swing and AWT be differentiated?


3 5610

Explain pass by reference and pass by value?

IBM, Wipro,

8 11540

In which way does a Primitive data type is passed ?

Sun Microsystems,

5 7400

What happens when a main method is declared as private?

L&T, DELL, Infosys, Sun Microsystems,

22 35540

Un-Answered Questions { Java J2EE }

how to handle exceptions in ejb?


In a container there are 5 components. I want to display all the component names, how will you do that?


Can explain about the validations and in your project where did u used the validations?


Hello, My project requirement is like I need to create a web page using MVC pattern. I hava a bean class, jsp page, servlet, service and dao. My jsp has two fields. One is dropdown list. The option values has to get populated from the database table. The other one is a text box and its value has to come from database table. As of now I have defined the fields in bean class, got the values from database using arraylists in dao class and I called this from service class. Can anyone please tell me the workflow of how the servlet will get this arraylist and populate the arraylist values as dropdown options in jsp page? Also I would like to know the role of bean class in MVC pattern? Thanks in advance!


What is Stream Tokenizer?


Hi we have an urgent requirement for Java/J2ee technical lead position & also looking for "Java Guidewire claimcentre" experienced professional for Bangalore location if interested can reach


what is ststic with example


Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).


What class is used to create Server side object ?


how to debug struts project in netbean ?


What is Generic in java? Where can we write Generic ( class or method or objects or etc...)? with simple example? Thanks, Bose. Infosys 2 In which way does a Primitive data type is passed ? Sun- Microsystems 4 what is the use of declaring constructor as private? Sai- Softech 5 what is difference between global methods and local methods? 1 What is meant by class loader and how many types are there? Apple 1 what is meaning of JIT? 4 What is an abstract class? Wipro 5 what is filters and its use? Virtusa 2 why is multiple inheritance not allowed in java? Elementus-Technologies 7 Differences between jdk 1.4 and 1.5 Wipro 4 is JVM platform dependent or independent..? IBM 6 what is main purpose of abstract class? 5 what is difference between colection and collections? Tech-Mahindra 11 What error occurs if a try-catch-finally statement sequence does not have a catch clause? 2 Explain the difference between scrollbar and scrollpane? 1 Explain the differences between public, private, protected and static? 4 Explain the difference between getAppletInfo and getParameterInfo? 1 Is Cegonsoft Pvt.Ltd. a good Institute? 4 Why only one Class is public in one file? Explain in details. Thanks in Advance. 11 Which method will get invoked first in a stand alone application?


How to provide security in java


how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)


java based application for hospital management


Is there any way to find whether software installed in the system is registered by just providing the .exe file? I have tried the following code but its just displaying the directory structure in the registry. Here the code : package com.msi.intaller; import java.util.Iterator; import ca.beq.util.win32.registry.RegistryKey; import ca.beq.util.win32.registry.RootKey; public class RegistryFinder { public static void main(String... args) throws Exception { RegistryKey.initialize(RegistryFinder.class.getResource("jRe gistryKey.dll").getFile()); RegistryKey key = new RegistryKey(RootKey.HKLM, "Software\\ODBC"); for (Iterator subkeys = key.subkeys(); subkeys.hasNext();) { RegistryKey subkey =; System.out.println(subkey.getName()); // You need to check here if there's anything which matches "Mozilla FireFox". } } }