| Back to Questions Page |
| |
| Question |
what is connection pooling with example? |
Rank |
Answer Posted By |
|
Question Submitted By :: Gopalraop |
| This Interview Question Asked @ AMDOC |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Connection pooling means that connections are reused rather
than created each time a connection is requested. To
facilitate connection reuse, a memory cache of database
connections, called a connection pool, is maintained by a
connection pooling module as a layer on top of any standard
JDBC driver product.  |
| Rakesh |
| |
| |
| Question |
what is custom tags with example? |
Rank |
Answer Posted By |
|
Question Submitted By :: Gopalraop |
| This Interview Question Asked @ AMDOC |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | A custom tag is a user-defined JSP language element. When a
JSP page containing a custom tag is translated into a
servlet, the tag is converted to operations on an object
called a tag handler
ex-bodyless tag 2 tags with body
1<tagName attributeName="value"
anotherAttributeName="anotherValue"/>
2.<tagName attributeName="value"
anotherAttributeName="anotherValue">
...tag body...
</tagName>  |
| Rakesh |
| |
| |
| Question |
what is difference between servletconfig and servletcontext? |
Rank |
Answer Posted By |
|
Question Submitted By :: Gopalraop |
| This Interview Question Asked @ AMDOC |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | 1.servletconfig is nothing but per one servlet and servlet
context is nothing but per entier web Application.  |
| Dileep |
| |
| |
|
|
| |
| Answer | Servlet Config: Servlet config is Unique for every Servlet.
Servlet Context: Servlet Context is same for all the Servlet.  |
| Suganthi [Techmatics] |
| |
| |
| Question |
what is ennumaration? |
Rank |
Answer Posted By |
|
Question Submitted By :: Gopalraop |
| This Interview Question Asked @ AMDOC |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Enumaration is an intetrface.It enumarates the elements
from top to bottom  |
| Sujanya |
| |
| |
| Question |
what is the use of abstract class? |
Rank |
Answer Posted By |
|
Question Submitted By :: Gopalraop |
| This Interview Question Asked @ AMDOC , Atos Origin, Invictus Tech |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Java Abstract classes are used to declare common
characteristics of subclasses. An abstract class cannot be
instantiated. It can only be used as a superclass for other
classes that extend the abstract class. Abstract classes
are declared with the abstract keyword. Abstract classes
are used to provide a template or design for concrete
subclasses down the inheritance tree  |
| Rakesh |
| |
| |
| Answer | Abstract class should must used for only implemented the
body in its Subclass and also implemented the astract
methods in ts subclasses.  |
| Malay [Techmatics] |
| |
| |
| Question |
How do u provide security in java |
Rank |
Answer Posted By |
|
Question Submitted By :: Swetha |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | elimination of pointer avoids programsto gain access to
memory location without proper authorization..  |
| Guest |
| |
| |
| Question |
can any one tell me when do u go for inheritance and
polymorphism |
Rank |
Answer Posted By |
|
Question Submitted By :: Swetha |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | Inheritance:Your are in a situation where you have to the
properties of a whole class repeatedly then you can go for
inheritance.
Note:Final class can't be inherited.
Polymorphism:When you are in a situation where you need to
use a method repeatedly then you can go for polymorphism.
Eg:
consider this method
add(int i,int j) and add(String s1,String s2)
the former will add two integers and later will concatenate
two strings but both using the same method name.  |
| Krish |
| |
| |
| Question |
what is difference between weblogic and websphere? |
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | You can say so many diff b/w welogic and websphere
In websphere u can add standalone server as a maneged
server in Domain
Where as in weblogic u can't add WLS server as member to
the another domain.
In websphere u can add webserver as a unmanaged node where
as u cannnt do that in weblogic.  |
| Suresh |
| |
| |
| Question |
life cycle of struts?
|
Rank |
Answer Posted By |
|
Question Submitted By :: Guest |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | process of creating , invoking , destroying the servlet is
known as "life cycle of struts". here three methods are
involved
1.init() :
Total intialization part of servlet ll be there in this .
2.service() :
Actual Bussiness code ll be there in this method
3.destroy() :
just destroying the servlet .  |
| Purna |
| |
| |
| Answer | In life cycle of struts there r several part are there
ActionServlet
Struts-config.xml
RequestProceser
formBean
Action class  |
| Kiran |
| |
| |
| Answer | There are many steps,
1. After getting the request from the client, the
ActionServlet invokes the goGet() or doPost() method, in
which there is a invokation of process() method.This method
desides the module.
2. Action servlet dispatches the request to RequestProcesor
class which does some core works of ActionServlet.Then
invokes the appropriate Action class.
3. Action class does main business logic and data accessing
(communicating with Moedl) thru execute() method and which
returns the ActionForward object.
4. In b/w the form field validations happens in form bean.
5. Depends upon the value of ActionForward object the view
is decided to display.(output)
4. Form bean is invoked for form field validation,  |
| Kartheeswari |
| |
| |
| Answer | The request is given to Action Servlet i.e; doGet or
doPost.
ActionServlet with the help of request uri locates one of
the RequestProcessor and dispatch the request to
RequestProcessor i.e; process method on RequestProcessor is
called InRequestProcessor.
It processes content type.
processes Locale.
processes actionPath.
processes actionMapping.
processes formBean.
processes action.
Error handling.
After processing action(i.e; execute method) depending on
the results locate the path to view(with the help of
ActionMapping) and dispatch the request to the located
path.  |
| Chandu |
| |
| |
| Answer | When the Framework is loaded, it first loaded the Web.xml
file. Then from the Servlet tag of Web.xml, it identifies
the ActionServlet(or the Struts-Cofig.xml). Then from
welcome-file tag of Struts-Cofig.xml, it identifies the
first JSP page and runs it. Then when the request comes
through that jsp, from acion-mappings tag of Struts-
Cofig.xml it identifies the request, through path tag
(request name) and input tag (jsp name), through name tag
it identifies which bean is needed to access the data and
through type tag it identifies which Action should be
invoked. Then through the forward tag it identifies to
which jsp it has to forward the response.  |
| Ayan Mukherjee |
| |
| |
| Answer | Sorry in the previous answer I made one mistake, welcome-
file-list is located in web.xml not in Struts-cofig.xml  |
| Ayan Mukherjee |
| |
| |
| Question |
What is Servlet? |
Rank |
Answer Posted By |
|
Question Submitted By :: Nagireddy.siddaka |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | A class that implements javax.servlet interface is cslled a
sevlet.It alloes is to develop a web application.  |
| Raman |
| |
| |
| Answer | servlet is the controller of the mvc pattern it is an java
class that extends javax.servlet .through which the user
should be taken to a new page .  |
| Praveen [Pranadeep] |
| |
| |
| Answer | Servlet:
simply say,Servlet is a serverside java code ... it is
mainly used to write business logic
there are two types of servlet
1.Generic Servlet
2.HttpServlet  |
| Tamilvanan [Pranadeep] |
| |
| |
| Answer | Servlet is a java program which is running in web server.
A class that implements javax.servlet interface is cslled a
sevlet.It alloes is to develop a web application.  |
| Nandam Mohan [Pranadeep] |
| |
| |
| Answer | Servlet is server side web application component written in
java which is used to handle client side request.
there are two type of servlet
1. Generic Servlet : extends javax.servlet.
2. HttpServlet : extends javax.Servlet.HttpServlet.  |
| Ajay Dhingra [Pranadeep] |
| |
| |
| Answer | servlets r used to design the server side applications that
work on clint server architecture
there are two type of servlet
1. Generic Servlet : extends javax.servlet.*
2. HttpServlet : extends javax.Servlet.HttpServlet.*
we should import these two packages  |
| Sunil [Pranadeep] |
| |
| |
| Question |
what is polymorphism? |
Rank |
Answer Posted By |
|
Question Submitted By :: Nagireddy.siddaka |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | using the same method for different ways  |
| Ddd |
| |
| |
| Answer | In object-oriented programming, polymorphism (from the
Greek meaning "having multiple forms") is the
characteristic of being able to assign a different meaning
or usage to something in different contexts - specifically,
to allow an entity such as a variable, a function, or an
object to have more than one form.  |
| Durgasri [Pranadeep] |
| |
| |
| Question |
what Data encapsulation in java? |
Rank |
Answer Posted By |
|
Question Submitted By :: Nagireddy.siddaka |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | grouping of data in a class.such methods varibles etc  |
| Ddd |
| |
| |
| Answer | Encapsulation means binding the data and code into a single
entity.  |
| Satyanarayana [Pranadeep] |
| |
| |
| Question |
what is run time polymorphism |
Rank |
Answer Posted By |
|
Question Submitted By :: Nagireddy.siddaka |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | In runtime polymorphism ... the code is called at run time
according to need or given conditions.
suppose there r two methods namely Add() one in super class
and other is in sub class.both have the same name and same
parameters.
so we have to choose that which method from them shld
called at run time i.e. of super class or of sub class.by
polymorphism we do that.
ex:-
class A
{
int add(){//code of the method}
//some other code
}
class B extends A
{
int add(){//code of the method}
//some other code
}
class AB
{
public static void main(String s[])
{
A ob1;
ob1=new A();
int i=ob1.add();//will call the method of super class.
ob1=new B();// sub class's reference can be assigned to
super class address but not vice versa.to do that we have
to type cast the reference of the sub class in reference of
the super class.
int j=ob1.add();//will call the method of sub class
}
}  |
| Durgasri |
| |
| |
| Answer | In C++ ;
if i have 2 clases
class A {
int x();
}
class B : public A {
int x();
}
void main(){
A* a = new B() ;
a.x(); // it will call the method of the super class A
// not B but in java it will call the method in the
// child B why ??
}  |
| Shiry [Pranadeep] |
| |
| |
| Answer | In Java Method overriding is the runtime or late binding
polymorphism.
class object is determine which class method is invoked.
ex:
class A {
protected void display(){ }
}
class B extends A {
protected void display(){ }
}
class MainClass {
public static void main(String arg[]){
A objA=null;
objA=new B();
objA.display(); // it invoke the Class B's display()
objA=new A();
objA.display(); // it invoke the Class A's display()
}
}
Note: the class's object only determine which method to call.  |
| Vijayakumar Chinnasamy [Pranadeep] |
| |
| |
| Question |
can you program for reverse string? |
Rank |
Answer Posted By |
|
Question Submitted By :: Nagireddy.siddaka |
| This Interview Question Asked @ IBM |
|
I also faced this Question!! |
© ALL Interview .com |
| Answer | say string s1="1234567";
for(int i=s1.length()-1;i<=0;i--)
{
System.out.Println(CharAt[i].toString());
}  |
| Caughtme |
| |
| |
| Answer | public static void main (String args[])
{ String s1="1234567";
for(int i=s1.length()-1;i>=0;i--)
{
System.out.print(s1.charAt(i));
}
}  |
| Raj [Pranadeep] |
| |
| |
| Answer | public class reverse {
public static void main(String args[]){
String s="malayalam";
StringBuffer sb=new StringBuffer();
int k=s.length();
for (int i = k-1; i >-1; i--) {
sb.append(s.charAt(i));
}
System.out.println(sb);
}
}  |
| Narayanan [Pranadeep] |
| |
| |
| Answer | public class StringReverseExample {
public static void main(String[] args)
{
String string=args[0];
String reverse = new StringBuffer
(string).reverse().toString();
System.out.println("\nString before
reverse:"+string);
System.out.println("String after
reverse:"+reverse);
}
}  |
| Indumathi [Pranadeep] |
| |
| |
|
| |
|
Back to Questions Page |