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 a data structure java?
Is vector thread safe in java?
Is java a security risk?
Explain the difference between jvm and jre?
What is difference overloading and overriding?
How do you remove an element from an arraylist in java?
What is string immutability?
State some advantages of java?
Why we used break and continue statement in java?
I am a fresher and know core java, c languge, html, css etc if I am illegible for any job then send it on my email tatranakshay276@gmail.com
what is the purpose of the runtime class?
What is null data type?
Why is whitespace important?
Why java is platform independent? Explain.
What is queue in java?