This is one of the most asked JAVA/J2EE interview questions.
So one can differentiate this design pattern and answer this as follows: -
Also see the following video on Buider Design Pattern for the preparation of JAVA/J2EE interview questions: -
Visit for Java/J2EE interview questions
Regards,
Visit for more author's other blogs on Java/J2EE interview questions
So one can differentiate this design pattern and answer this as follows: -
Strategy | State |
Family of algorithms is interchangeable which means that every algorithm does the same thing but in different way. | States are not interchangeable. |
Encapsulate each algorithm into a class. | We encapsulate each state into a class in state pattern. |
Descendants should prepared for most possible events. | Can only process a few events according to the state machine model. |
Concrete strategies usually don’t know the others. | Usually concrete states know other concrete states. |
More dynamic modeling. | More static modeling. |
Also see the following video on Buider Design Pattern for the preparation of JAVA/J2EE interview questions: -
Visit for Java/J2EE interview questions
Regards,
Visit for more author's other blogs on Java/J2EE interview questions
Great and Useful Article.
ReplyDeleteOnline Java Course
Java Online Training
Java Course Online
J2EE training
online J2EE training
Best Recommended books for Spring framework
Java Interview Questions
Java Training Institutes in Chennai
Java Training in Chennai
J2EE Training in Chennai
java j2ee training institutes in chennai
Java Course in Chennai