GeekInterview.com
Series: Subject: Topic:

J2EE Interview Questions

 
Sub Categories (+ View)
Subject Name
Questions
Answers
Last updated
572
3435
May
21st,
2013
180
500
Apr
6th,
2013
1120
2011
May
19th,
2013
149
471
Apr
1st,
2013
17
47
Oct
2nd,
2011
200
705
Dec
19th,
2012
22
38
Apr
1st,
2013
177
828
Mar
20th,
2013
110
635
May
18th,
2013
221
276
May
15th,
2013
Showing Questions 1 - 20 of 122 Questions
First | Prev | | Next | Last Page
Sort by: 
 | 

Synchronization tool

Asked By: Raviapiit | Asked On: Jan 24th, 2013

What is synchronization and what are tools of synchronization ?

Answered by: manoj.arah on: Apr 25th, 2013

Synchronization is the process of allowing threads to execute one after another. Synchronization control the access the multiple threads to a shared resources. Without synchronization of threads, one ...

Core Java

Asked By: Prasad MN | Asked On: Mar 11th, 2013

Why thread has created in two ways and why not in one way or three ways? Anyone please help me to get the answer

Answered by: mikhailguzman on: Mar 19th, 2013

Creating thread is basically instantiate the Thread class. There are two ways to instantiate class: with extend or implementation of interface.

Common design pattern

Asked By: mannam haribabu chowdary | Asked On: Aug 27th, 2012

What is command design pattern? Explain this pattern based on below scenario map m=new hashmap(); hashmap m=new hashmap(); what is difference between map m=new hashmap(); hashmap m=new hashmap();

Answered by: Prasad MN on: Mar 19th, 2013

The main difference of creation of hashmp instance

HashMap hm = new HashMap(); Here we are getting the HashMap methods only will get inherited.

Where as
Map mp= new HashMap(); // Here will get the Map interface methods inherited into class.

Can we declare class as protected?

Asked By: suresh | Asked On: Feb 25th, 2006

What is the scope for this class?

Star Read Best Answer

Editorial / Best Answer

Answered by: dipl. ing. Dan

View all answers by dipl. ing. Dan

Member Since Mar-2006 | Answered On : Mar 24th, 2006

Some people might get confused by the many posts. The correct answer to the question "can we declare class as protected?" is YES, BUT only as an inner class. A 'normal' class cannot be protected or private.

// 'Normal' class - only default or public allowed

public class ProtectedOrNot {

  // Inner class - public, default, protected, private allowed

  protected class InnerClass {

  }

  public static void main(String[] args) {

  }

}

Answered by: prakash on: Mar 18th, 2013

Class can be protected or private but only inner

Answered by: amreenkhader on: Jan 20th, 2012

The class cannot be declared as protected..

Why init(), destroy() can't be overridden in servlets?

Asked By: sirisha | Asked On: Jul 11th, 2007

Answered by: rekha on: Feb 13th, 2013

Can override init & destroy .
People used to make mistakes by overriding inti(ServletConfig).
Because if we override and forget to call super.inti(ServletConfig) then default actions doesnt get performed. As a result getServletConfig() will return null.


Answered by: Praveen D on: Feb 1st, 2013

It is possible to Override init() & destroy() methods in servelts

What is project architecture?

Asked By: surendra.meda | Asked On: Oct 2nd, 2006

Answered by: Prasad MN on: Dec 29th, 2012

Project Architecture is nothing but is structure of your application. What are the layers are used to retrive the data from the Database."java Presentation Layer ----------->Contr...

Answered by: mannam haribabu chowdary on: Aug 27th, 2012

The architectures is nothing but how many layers will be there and which technologies are involved on each layer. 1) View Layer -------------> JSP, HTML, Ajax Technologies 2) Persistence Layer -----...

What is singleton class?

Asked By: pkmishra09 | Asked On: Sep 21st, 2012

What is the exact use of singleton class?Just using priVATe class constructor makes it a singleton class?

Answered by: MN Prasad on: Dec 29th, 2012

Singleton class is used for only one instance is created for entire application. One instance and multiple threads."java class Singleton { private static int singleton; pri...

Answered by: animesh.chatterjee on: Dec 11th, 2012

In software engineering, the singleton pattern is a design pattern that restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions acr...

What are the different acess specifiers?

Asked By: suresh | Asked On: Feb 25th, 2006

Answered by: Neharika Sanwasi on: Dec 28th, 2012

public:
default:
private:
protected:

Answered by: snehlata on: Sep 15th, 2007

there are 4 access specifiers defined in java.private: who can be accessed within class only.default:who can be accessed within the same package.protected: who can be accessed within the same package ...

What is the difference between JSP tag and HTML tag

Asked By: meher_posh | Asked On: May 22nd, 2006

Answered by: Prasad MN on: Dec 17th, 2012

Both the tags are used to developing the web pages. HTML tags are static. Where as JSP tags are dynamic.

Answered by: Abhilash vvg on: Dec 6th, 2012

Differences between HTML and JSP : HTML pages provide Static content with emphasis on the appearance, semantics and layout of the Information in the browser. JSP pages consists of dynamically changi...

Java single inhertiance and multiple inheritance

Asked By: sivakumar | Asked On: Oct 13th, 2005

1.What is meant by inheritance,single inhertiance,multiple inheritance?2.Define abstract class & abstract method?3.How to developed and delopying a servelt,JSP program in the tomcat apache server,weblogic server?Plz send the answer for the particular abo

Answered by: harps on: Nov 20th, 2012

Single Inheritance in Java means that a sub class have the capability of inheriting the properties of only one class whereas multiple inheritance is not supported by Java as it increases the complexit...

Answered by: Chandra Mohan.C on: Nov 8th, 2012

Single Inheritance: It is sharing only a particular classes Eg: Agents,Proker,join family ......... Multiple Inheritance: It is also sharing with all classes.access specification ...

Java-class variable vs instance variable

Asked By: nitya123 | Asked On: Sep 9th, 2012

Some body please tell me what is the difference between class variable and instance variable???

Answered by: qamrun on: Nov 8th, 2012

Static variable, the field is allocated when the class is created. It belongs to the class and not any object of the class. It is class variable. Instance variable, the field is allocated when the c...

Answered by: arvindkore on: Oct 8th, 2012

class variable is static variable is create when class structure is defined ,and other variables which are create and destroyed with object are called instance variables

How will you provide security to your j2ee project?

Asked By: mannam haribabu chowdary | Asked On: Aug 28th, 2012

Answered by: Roni on: Oct 4th, 2012

Security roles can be applied at application level by either declarative method or programatically. Users or Groups are binded during application deployment by administrator.

Why is that the final variable has to be initialized as soon as it is declare?

Asked By: vishalanand_154 | Asked On: Jul 31st, 2008

Star Read Best Answer

Editorial / Best Answer

Answered by: r.praveenkumar

View all answers by r.praveenkumar

Member Since Oct-2007 | Answered On : Aug 1st, 2008

when a variable is declared as final we cant change its value again. we use final variable to declare a constant so when we declare a variable as final and if we were allowed to not to give its value at the time of declaration it would not make sense so people who designed java made mandatory to give the value when we declare a final variable. then only it will be sensible.
final PI=3.14;
then we cant change PI's value. think if the above statement do not contain a vl it would not make sense.

Answered by: Nitin Maulekhi on: Jul 18th, 2012

final keyword can be applied on:- 1.class 2.member functions(only non-static) 3.data-members(both static and non-static) 4.local variables. 1.by making a class final ,that class cannot be inherited....

Answered by: Rohit Verma on: Jul 10th, 2012

Like any variable, a final variable can also be first declared and then assigned a value. But it can be only assigned a value once and only once ( as its final variable ). for example :- final Strin...

Available methods in synchronization ?

Asked By: sudhakar_bvr | Asked On: May 30th, 2006

Answered by: dhayasinfo on: Jul 16th, 2012

Synchronization is a process by using Synchronize keyword to prevent the dead lock. This can be used in methods or block to prevent two threads to access the same resource in the same time.

Answered by: amreenkhader on: Jan 20th, 2012

In this two threads cannot use the same resource simultaneously beacuse the thread execution gets interrupted or terminated hence only a single thread can share resource at a time.

Cloning

Asked By: hanuman.gorla | Asked On: Jun 24th, 2012

What is cloning? Why we are using cloning concept? And how many types of cloning?

Answered by: surendar on: Jul 16th, 2012

Cloning is the process of creating duplicate copy with current object state. We use this concept in real world like, eg: In Bike manufacturing company, we use cloning for creating same bike object,...

Answered by: dhayasinfo on: Jul 16th, 2012

In Java, Cloning is kind of logic to create a copy of the class by implementing Clonable interface.

Why pointer concept not use in Java?

Asked By: sunima dila | Asked On: Jul 29th, 2006

Answered by: SATYAJIT KUMAR on: Jul 14th, 2012

Java does not support pointer or cannot allow pointers because doing so would allow java programs to breach the firewall between the java execution environment and the host computer

Answered by: Kanchan on: Apr 12th, 2012

java does not support pointer because of security purpose, as if it have pointer then till easy to find out the addressing of its application which may make it unsecure

Thread priority levels

Asked By: cnvreddy | Asked On: Aug 15th, 2008

How many thread priority levels levels are there in Java 3810 1224

Answered by: Sandhya.Kishan on: Jul 4th, 2012

The priority of thread can be max,norm and min depending on the underlying os or JMV.

Answered by: almas_23 on: Aug 17th, 2008

The thread priority levels in terms of integer range from 1 to 10
For max, min & medium priority we have the following:

MAX_PRIORITY  (value=10)
NORM_PRIORITY  (value=5)
MIN_PRIORITY  (value=0)

What is .Xba file?

Asked By: vivekso | Asked On: Sep 28th, 2007

Answered by: Sandhya.Kishan on: Jul 4th, 2012

File extension .xba is a Unknown or unassigned file extension.

Answered by: Ashwinshenoy7 on: May 8th, 2011

Let me tell you where exactly it is used and what it does as per my knowledge.Application library used by OpenOffice.org, an open-source productivity suite; contains the functionality for the componen...

Why Java soft has declared httpservlet class as an abstract class?Is there any performance issue?

Asked By: nabi_alam | Asked On: Mar 28th, 2012

In httpservlet class there is no any abstract method although Javasoft declared this class as an abstract class.Ok,this is valid in Java.So if we want to utilize this class we will have to extends this class.But we can use to achieve this one by using httpservlet class as simple Java class also.

Answered by: Sandhya.Kishan on: Jul 4th, 2012

Java soft has declared httpservlet class as an abstract class for its performance, scalability and reusability issues and for security purpose.

Answered by: n on: Apr 22nd, 2012

Security Purpose

Servlet as the shared object

Asked By: dev patel | Asked On: Jun 13th, 2012

Can we use a servlet as the shared object

Answered by: Sandhya.Kishan on: Jul 4th, 2012

We can use servlet as a shared object by using as shared object the servlet can maintain its state by using its init() and destroy() methods to load and save its state.

First | Prev | | Next | Last Page

 

 

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Question Categories

Core Java Interview Questions

EJB Interview Questions

Hibernate Interview Questions

Java Interview Questions

Java Patterns Interview Questions

JDBC Interview Questions

JMS Interview Questions

JSP Interview Questions

Java OOPS Interview Questions

Ruby Interview Questions

Servlets Interview Questions

Spring Interview Questions

Struts Interview Questions

Websphere Interview Questions

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.