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,

32 51744

Differentiate Vector and ArrayList?

Wipro, Max Telecom,

6 5991

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


6 6543

What is an abstract class?


7 5462

How can final class be used?

Wipro, Accenture,

4 7271

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


1 8476

Java support what type of parameter passing ?


7 9783

Explain the term serialization?


10 7836

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


10 9113

What is Overriding and how can it be used?

Consagous, Wipro,

7 11960

How is serialization used generally ?

3 3375

How are Swing and AWT be differentiated?


3 5017

Explain pass by reference and pass by value?

IBM, Wipro,

8 9776

In which way does a Primitive data type is passed ?

Sun Microsystems,

5 6225

What happens when a main method is declared as private?

L&T, DELL, Infosys, Sun Microsystems,

20 28812

Un-Answered Questions { Java J2EE }

How to determine, that beans are TX or not?


Why are the destructors for base class and derived class called in reverse order when the program exits


Explain Asynchronous Message Consumption in JMS?


what is multiple server?


I want to use the markerfor playing a video using the jmf.Suppose my video length is of 2 hours.I want it to play ex-15 mintue or 20 mintue and should stop after assigning the time.I am providing my piece of code............please help me.... package com.jha.cdac.lila.praveen; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.Toolkit; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import; import; import; import; /** * * @author vinays */ import; import; import; import javax.swing.JFrame; public class PlayVideo extends javax.swing.JFrame{ Player player; Component center; Component south; // this code is required for playing the video file of mpeg,mp4,mp3,3gp,rm,flv, //wmf,mpv,vob,qt and the asf extension public PlayVideo() { File file = new File("Lesson1.mpg"); try { load(file); // load() } catch (Exception ex) { //Logger.getLogger(LessonNarrative.class.getName ()).log(Level.SEVERE, null, ex); System.out.println("Error while loading file............"+ex); } } //the piece of code given below is used to load the file which user want to play. public void load(final File file) //load the file throws Exception { URL url = file.toURL(); final Container contentPane = getContentPane(); if (player != null) { player.stop(); } // MediaLocator mediaLocator=new MediaLocator (file.toURL()); // DataSource dataSource=Manager.createDataSource (mediaLocator); // player=Manager.createPlayer(url); player = Manager.createRealizedPlayer(url); ControllerAdapter listener = new ControllerAdapter() { @Override public void realizeComplete( RealizeCompleteEvent event) { Component vc = player.getVisualComponent(); player.getVisualComponent(); if (vc != null) { contentPane.add(vc, BorderLayout.CENTER); center = vc; } else { if (center != null) { contentPane.remove(center); contentPane.validate(); } } Component cpc = player.getControlPanelComponent(); if (cpc != null) { contentPane.add(cpc, BorderLayout.SOUTH); south=cpc; } else { if (south != null) { contentPane.remove(south); contentPane.validate(); } } pack(); // //setTitle(file.getName()); //to get the title of Video or Audio File } }; Time tm=new Time(30.4402403); Time tm1=new Time(5.7256199); player.addControllerListener(listener); player.setMediaTime(tm1); player.setStopTime(tm); // player.setMediaTime(new Time(5.0)); //player.setStopTime(new Time(73)); player.realize(); player.start(); } public static void main(String args[]) throws ClassNotFoundException { PlayVideo pv = new PlayVideo(); JFrame f = new JFrame("Lesson1"); f.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { System.exit(0); } }); f.getContentPane().add("Center", pv); f.pack(); Dimension screenSize = Toolkit.getDefaultToolkit ().getScreenSize(); int w = 420; int h = 140; pv.setLocation(screenSize.width/2 - w/2, screenSize.height/2 - h/2); pv.setSize(w, h); pv.setVisible(true); }


difference between  ejb,struts,hibernate,spring and jsp


which protocol it user to connect manage server to admin ? where it is defined ?


I am newbie in J2EE & looking for strong basic behind each concept as, Why do we use private access specifier before each variable of type property bcoz ultimately to access it outside the class we use public method as getter & setter ? If we use getter & setter to access it outside the class so better we make variable as public so that it is easily available outside of the class... Please guide me why do we use as private ????


What are the common JDBC problems that you got and how do you solved them?


What are the differences between Java 1.0 and Java 2.0?


What is the difference between JDBC 1.0 and JDBC 2.0?


In RMI, inorder to sent the stub reference to the client, is we have to load the server object first into the memory or can we directly sent reference to the client?


A user of a web application sees a jsessionid argument in the URL whenever a resource is accessed. What does this mean? a. The form must have the field jsessionid b. URL rewriting is used as the session method c. Cookies are used for managing sessions


what are the differences between Generic server and application server in WebSphere environment?


Java openings 3 - 5 years, Lnt Infotech. requirements - core java, J2ee, struts, hibernate Interview Date:- 19 March 2011 Time:- 9:00 AM to 12:00 Pm Interview Location - L & T Infotech, Manapakkam, Chennai Refererral PS NO:- 291649 (Please mention this when u fill the form only then u will be considered for interview) Documents Required:- Latest Resume, Photograph and last 3 payslips Mail me on once u appear for interview