what is tempplate pattern

Answer Posted / srinu

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 ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of the System class?

583


How do you classify Dialog Box?

649


What are the two parts of a conditional statement?

518


What is scope of a variable?

606


Explain the public class modifier?

507






What modifiers may be used with an inner class that is a member of an outer class in java programming?

538


How is abstraction implemented in java ?

546


When does an object becomes eligible for garbage collection in java?

583


What are the string methods in java?

584


how does the run() method in runnable work? : Java thread

516


What is the integer of 16?

540


Give any two differences between C++ and java.

562


Does .length start 0 java?

569


What is wrapper class html?

531


how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)

1909