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
What is the inheritance?
Can inner class be public in java?
What is a boolean flag in java?
what are abstract functions?
What is object cloning in Java?
Can we override private constructor in java?
Can we make constructors static?
What is the use of coding?
Define an applet in java?
What is bubble sort in java?
How does list work in java?
Is simpledateformat safe to use in the multithreaded program?
What is the biggest integer?
What was java originally called?
Can we increase size of array?