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 48081

Differentiate Vector and ArrayList?

Wipro, Max Telecom,

4 4879

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


6 5357

What is an abstract class?


6 4346

How can final class be used?

Wipro, Accenture,

3 6228

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


1 7453

Java support what type of parameter passing ?


7 8643

Explain the term serialization?


10 6746

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


10 7943

What is Overriding and how can it be used?

Consagous, Wipro,

7 10989

How is serialization used generally ?

2 2700

How are Swing and AWT be differentiated?


3 4603

Explain pass by reference and pass by value?

IBM, Wipro,

7 8878

In which way does a Primitive data type is passed ?

Sun Microsystems,

5 5238

What happens when a main method is declared as private?

L&T, DELL, Infosys, Sun Microsystems,

19 23926

Un-Answered Questions { Java J2EE }

What is a convertor?


what is an isolation level?


How listener identify that the event came from a particular object?


Addition to previous section relative word 5th one was Putrid ans: rotten, also there was prob. in 1st section on bucket weight ans:10kg, also there was a prob. on train speed to find bridge length ans:800 mtrs.


What are the sequence of steps to write pub or sub model kind of application?


Explain the OOPS concept in Realtime Scenarion ? Take example as CAR. Please explain indetail ?


Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain


what is the Relationship between EJB and CORBA architecture?


How we store procedure in oralce for callable statements in jdbc


How to determine SGA site?


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); }


tell me the permenent memory issues?


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


how i secure my site with the https protocol.what are the steps?


In inglish: How to convert jar to exe files? Em português: Como converter arquivos .jar para .exe?