ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
what is tempplate pattern
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is tempplate pattern
Answer
# 1
Intent
 Define the skeleton of an algorithm in an operation,
deferring some steps to
subclasses. Template Method lets subclasses redefine certain
steps of an
algorithm without changing the algorithm's structure.
 Motivation
Sometimes you want to specify the order of operations that a
method uses,
but allow subclasses to provide their own implementations of
some of these
operations
 
Is This Answer Correct ?    3 Yes 2 No
Naresh Tuhania
 
  Re: what is tempplate pattern
Answer
# 2
Template pattern allows abstract representation of methods.
Implementation of these methods is left to the classes that
inherit these abstract methods. We define only a template
for the method without defining any algorithm
 
Is This Answer Correct ?    1 Yes 0 No
Prashant
 
 
 
  Re: what is tempplate pattern
Answer
# 3
provide an abstract definition of a method or a class and 
redefine its behavior later or on the fly without changing 
its structure.
 
Is This Answer Correct ?    0 Yes 0 No
Ramavanan
 
  Re: what is tempplate pattern
Answer
# 4
A java method that is capable of calling set of methods in a
sequence to completd task is called template method

EX:-
public void xyz()
{
  x();
  y();
  Z();
}
Best Example for template design pattern for in struts
framework org.apache.struts.action.RequestProcessor
class follow Template Design pattern. In RequestProcessor
class nearly 16 no.or processXXX() methods are their These
methods are exceuting sequence thats way this method is
called Template method.
            RequestPrcocessor calls cretes/locates formbean
class object and calls Reset(),validate() methods in
formbean class and calls execute()in Action class.This takes
Application contrlloer for frontcontroller servlet of Action
class
 
Is This Answer Correct ?    0 Yes 0 No
Srinu
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
what is the difference between Cpp And Java Infosys7
How java is platform independent? TCS12
What is the difference between a Window and a Frame?  1
where lives in jvm  3
What do u mean by method and also contructer in java ?  3
if i have one string class then how can you achive this class functionality of this class? Fidelity3
What are uses of Hash Code? Cognizent2
suppose string s1="rajnish"; string s2="bhaskar"; then what will be happend ? Fidelity6
What is static binding and where it occurs?  2
Is it possible to write static method in abstract class? justyfy your answer? Hexaware3
How to do validation of the fields in any project ?  2
Can we inherit the constructor in a Class?please give one example. iGate3
When will we use class loader?  1
How to initialize an Applet ? TCS6
Create a form of user Login in JSP, that accepts the user name and password from user and authenticate it with user names and passwords stored in database. (Plz provide me answer immediately)  1
How will you override default serialization mechanism in java  2
What is the preferred size of a component?  1
We have two methods to create methods the threads. 1. Implementing runnable interface 2. Extending to thread class and overriding run method. Among these two which one is better and why? Please explain me in detail.  2
What is the difference between java and .Net? Bosch5
How will you convert an ArrayList to Arrays? KPIT3
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com