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,

31 46612

Differentiate Vector and ArrayList?

Wipro, Max Telecom,

4 4449

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

Wipro,

6 4939

What is an abstract class?

Wipro,

6 3931

How can final class be used?

Wipro,

2 5761

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

Wipro,

1 7017

Java support what type of parameter passing ?

Wipro,

7 8157

Explain the term serialization?

Wipro,

10 6382

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

Wipro,

10 7592

What is Overriding and how can it be used?

Consagous, Wipro,

7 10663

How is serialization used generally ?

2 2562

How are Swing and AWT be differentiated?

Wipro,

3 4467

Explain pass by reference and pass by value?

IBM, Wipro,

7 8565

In which way does a Primitive data type is passed ?

Sun Microsystems,

5 4937

What happens when a main method is declared as private?

L&T, DELL, Infosys, Sun Microsystems,

18 21867



Un-Answered Questions { Java J2EE }

Draw a UML class diagram for the code fragment given below: public class StringApplet extends Applet { private Label sampleString; private Button showTheString; private ButtonHandler bHandler; private FlowLayout layout; public StringApplet() { sampleString = new Label(" "); showTheString = new Button (" Show the String"); bHandler = new ButtonHandler(); layout = new FlowLayout(); showTheString.addActionListener(bHandler); setLayout(layout); add(sampleString); add(showTheString); } class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { samplestring.setText("Good Morning"); } } } Note: The methods need not be indicated on the diagram.

635


Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword

593


Can we call virtual funciton in a constructor ?

685


what are the gbx,gdb and other tools in linux for core dump,and how to configure stdout,stderr..what is the difference between stdout ,stderr and coredump. how to create core dump and view that one? please can anybody explain me?

2252


Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements?

4944


how can we sync the nodes with administration server in weblogic.

1941


What is a policy?

700


Name the class that is used to bind the server object with RMI Registry?

764


why an outer class cannot be declared as private?

1950


explain the concept of virtual method invocation in polymorphism in detail?

742


How to pass parameters in RMI?

720


What is the difference between JDBC 1.0 and JDBC 2.0?

1441


How do you download stubs from Remote place?

362


How entity beans support container managed persistence?

1069


public class ActionSearchBean extends GenericSearchBean { @Override public String search() { data.setRowCount(null); if(data.getRowCount()==0){ data.getNoRecordFound().setRendered(true); data.getDataScroller().setRendered(false); } return "searchAction"; } @Override public String clear() { data.setRowCount(null); if (data.getRowCount() > 0){ data.getNoRecordFound().setRendered(false); data.getDataScroller().setRendered(true); }else{ data.getNoRecordFound().setRendered(true); data.getDataScroller().setRendered(false); } data.setModel(new ActionDTO()); data.setRowCount(null); return "searchAction"; } } what is the purpose of @Override ...what will do @Override here ?

928