Logo F2FInterview

Patterns Interview Questions

Q   |   QA

There are very few patterns which are used by developers and programmers they are Gang of four patterns, Canonical form or pattern and Alexandrian form. Some of the elements present in patterns are Problem, name, aliases, context, forces, solution, examples, resulting context, rationale, related patterns, uses, etc. 

Abstract factory pattern is used to create instances of abstract classes from a matched set of concrete sub classes. This pattern allows a developer to use various complex technologies such as windowing systems with similar characteristics and functionality. It basically createsabstract classes. 

Canonical and GoF patterns are almost similar in characteristics. Canonical form places greater importance on explicit forces and resolutions whereas in GoF format a solution is broken into different sections and it also uses design diagrams with sample code. 

Java singleton is used when a constructor and finalize methods are used only once during the lifetime of the application. If a class is referenced from within then it is garbage collected by the Java which can be retrieved if called again but the problem comes when the constructor or finalize methods are used only once. 

State dependence tells you about the action performed on the object whether succeeded or failed, action which can be performed, monitoring methods, postponing, triggering, preventing, etc. This is also used to monitor methods. 

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: