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 does sprintf mean?
What is unicode datatype?
What is linkedlist in java?
Why does java does not support multiple inheritance? Explain
Tell us something about an iterator.
In a class implementing an interface, can we change the value of any variable defined in the interface?
What does flag mean in java?
What does || mean in code?
What is integers and example?
What is the difference between a constructor and a method?
What are the types of collections in java?
What is return in java?
how to one war file class to another war file class?
What is a databasemetadata?
how would you implement a thread pool? : Java thread