Java Design Pattern Interview Questions and Answers [ MOST ASKED DESIGN PATTERN INTERVIEW QUESTIONS]

preview_player
Показать описание
In this video you will learn about Most Asked Design pattern Interview Questions with practical examples and live Demo for freshers as well as experienced. Please refer to below link for part 2

Udemy Course of Code Decode on Microservice k8s AWS CICD link:

Course Description Video :

this is http link :
Please let me know if its working or not

Java Design Pattern Interview Questions part 2

In Video of java interview questions and answers we have covered live real time coded example and flow charts to illustrate this and for better visual understanding. Content here is servers just theoretical purpose. Practical Real time examples with flow charts will be covered in video itself.


Q) What do we need Design pattern-
A) As Design Patterns are well documented and understood by software architects, designers and developers, then their application within a specific solution will likewise be well understood.

Patterns give a software developer an array of tried and tested solutions to common problems, thus reducing the technical risk to the project by not having to employ a new and untested design, thus saving time and effort during the implementation stage of the software development lifecycle

Q) What are the Creational Patterns?
Creational design patterns are related to the way of creating objects.
This pattern is used to define and describe how objects are created at class instantiation time

Q) What Is Factory Pattern?
In the Factory pattern, we don't expose the creation logic to the client and refer the created object using a standard interface.

Steps:
1) create main class which call factory class.
2) Factory class returns required class instance

Q) What Is Abstract Factory Pattern?
This factory is also called as factory of factories.
Abstract Factory lets a class returns a factory of classes.
So, this is the reason that Abstract Factory Pattern is one level higher than the Factory Pattern.

An Abstract Factory Pattern is also known as Kit.

Steps:
1) create main class which call factory of factory class.
2) Factory of factory / factory Producer creates instance of factory class.
3) Factory class returns required class instance

Q) What Is Singleton Design Pattern?
Singleton pattern is one of the simplest design patterns in Java.
This pattern involves a single class which is responsible to create an object while making sure that only single object gets created.
This class provides a way to access its only object which can be accessed directly without need to instantiate the object of the class.

Steps:
1) create main class which call CacheImpl Class.
2) CacheImpl class has 2 methods : 1st to load the key value in map and create the cache. 2nd to return the required cloned object.
3) The main class , parent of all reuired concerete class contains cloning technique. Rest concrete class are normal POJOs, nothing special.

Q) What Is Builder Design Pattern?
Builder Pattern refers to approach that focuses on constructing a complex object from simple objects using step-by-step approach.

Major roles used in this design patterns are :
Complex Object / Final Product – e.g. house – complex object which we will generate with builder design pattern
Builder – abstract class / interface that defines all ways to create the product. It also has getFinalProduct method that will finally return complex object.
ConcreteBuilder – multiple Builder Impls that will give different final objects which are complex to design,
Director: Controls complex object creation. It has 2 main goals : 1st to call appropriate concrete builder class to create correct complex object. 2nd to return that complex object.

Subscriber and Follow Code Decode

#DesignPatternsinterviewquestions #javainterviewquestions #java #codedecode
Рекомендации по теме
Комментарии
Автор

Your explanation is awesome madam. Thank you for your efforts, very great explanation. keep up the good work.

chinmayabhyankar
Автор

Your explanation is unbelievably super madam. 12/10 marks for ur explanation. No other words. Because of ur videos i am cracking tech interview rounds. Thanks you so much. But surely one day i will repay you.

BaluKompalli
Автор

FANTASTIC!!, I have reading these concepts for almost a year I guess, but never truly understood them. A big thanks for such great work. Keep the good work going.

sanyammadaan
Автор

Never found such clear explanation!!! Thanks a lot blessed to have you subscribed.

prakashadhikari
Автор

Your content gives senior-level answers of topics any junior can understand and crack all interviews.

akshaysardhara
Автор

Watching your videos is sufficient to attend any backend interviews

bharathreddy
Автор

I used to watch your sessions to attend interviews. It helps me alot. Thanks for the such nice explanations.

muralinayani
Автор

I am speechless! Your explanation is beyond expectation! keep up the good work! what makes you different from others is your examples are from real time scenarios..what most interviewer expects! hats off Madam! take a bow!

anirbanhaldar
Автор

You can teach way better than the teachers in my college !!! Keep it up !!! INDORI FOREVER !

rajatgupta
Автор

you simply rock I am not a computer science student but I am becoming one because of you keep up good work God bless you

sunshinemeadows
Автор

The way you have explained these design patterns are impeccable, especially Abstract Factory and Builder Pattern with great Real time examples.
Keep up the Good Work. A big thanks to you :)

prajwalshetty
Автор

You are an Angel to save all the coders here.💥 Thank you so much! 👏💚❤💙

digitalbytes
Автор

Thank you for explaining these with code examples, as it helped me to get more clarity about the use cases of creational design pattern through them.

aman_deep
Автор

Just Finished Design pattern Creational Part, Understood line by line with Example, Moving forward to structural part, Thanks

avinashrawat
Автор

You are doing an amazing job by helping many people to understand or brush up the core concepts. But I would like to mention that what you are referring as a hashcode is not actually a hashcode. It's an address to an objects memory location. Hashcode is certainly be a number, formally an integer...

However, you are an angel for many to land in their dream jobs. Keep rocking..

itsjeevani
Автор

Nice Explanation, One more thing in prototype method, to add delay of 5 seconds in creating objects using new keyword to simulate the cost of creating new object and object created using prototype are fast without delay of 5 seconds

prsutar
Автор

I really appreciate your hard work and it's helping a lot.. I don't find any channel or anyone explaining the way you are doing...

Small request it would be great if u ionout or resequence ur playlists... Please

pdolley
Автор

I like explanation ...it is simple and understandable...please upload remaining design pattern..

anupamdas
Автор

Cracked interviews for multiple MNCs by going through your play list.. thank you😊

rohinikothavade
Автор

Like the way you explains everything starting with theory then practical implementation.. never found such a well structured tutorial..keep going with the same 👍

vishalkadu