KyaPoocha.com

Huge Collection of Interview Questions


Archive for January, 2007

Can you have an inner class inside a method and what variables can you access? 

Yes, we can have an inner class inside a method and final variables can be accessed.  Read more »

What is a cloneable interface and how many methods does it contain? 

It is not having any method because it is a TAGGED or MARKER interface.  Read more »

What is the difference between Integer and int? 

a) Integer is a class defined in the java.lang package, whereas int is a primitive data type defined in the Java language itself. Java does not automatically convert... Read more »

What are inner class and anonymous class? 

Inner class : classes defined in other classes, including those defined in methods are called inner classes. An inner class can have any accessibility including... Read more »

What modifiers may be used with top-level class? 

public, abstract and final can be used for top-level class.  Read more »

What is meant by Pre-initialization of Servlet? 

When servlet container is loaded, all the servlets defined in the web.xml file does not initialized by default. But the container receives the request it loads the... Read more »

What is ServletContext? 

ServletContext is an Interface that defines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of... Read more »

What is a Servlet? 

Java Servlets are server side components that provides a powerful mechanism for developing server side of web application. Earlier CGI was developed to provide server... Read more »

What are the types of Servlet? 

There are two types of servlets, GenericServlet and HttpServlet. GenericServlet defines the generic or protocol independent servlet. HttpServlet is subclass of GenericServlet... Read more »

What are difference between ActionErrors and ActionMessage? 

ActionMessage: A class that encapsulates messages. Messages can be either global or they are specific to a particular bean property.Each individual message is described... Read more »

What are the core classes of the Struts Framework? 

Core classes of Struts Framework are ActionForm, Action, ActionMapping, ActionForward, ActionServlet etc.  Read more »

What are Tag Libraries provided with Struts? 

Struts provides a number of tag libraries that helps to create view components easily. These tag libraries are: a) Bean Tags: Bean Tags are used to access the beans... Read more »

What are the components of Struts? 

Struts is based on the MVC design pattern. Struts components can be categories into Model, View and Controller. Model: Components like business logic / business... Read more »

What is Struts actions and action mappings? 

A Struts action is an instance of a subclass of an Action class, which implements a portion of a Web application and whose perform or execute method returns a forward. An... Read more »

What is the difference between perform() and execute() methods? 

Perform method is the method which was deprecated in the Struts Version 1.1. In Struts 1.x, Action.perform() is the method called by the ActionServlet. This is... Read more »

Page 2 of 9«12345»...Last »