Using Factory method pattern in Java project

Published: 16 September 2020
on channel: Improve Your Programming skills
62
1

Factory method(creational design pattern) helps create the object its caller does not need to know how to create that object. The caller only needs to pass the parameters, the function will know what object it has to create to return.

For example, when calling the factory method
createMilkProduct(SweetenedMilk)
It returns sweetened milk product

createMilkProduct(UnSweetenedMilk)
It returns un-sweetened milk product

createMilkProduct(StrawberryMilk)
It returns strawberry milk product


On this page of the site you can watch the video online Using Factory method pattern in Java project with a duration of hours minute second in good quality, which was uploaded by the user Improve Your Programming skills 16 September 2020, share the link with friends and acquaintances, this video has already been watched 62 times on youtube and it was liked by 1 viewers. Enjoy your viewing!