Languages

Java static factory method - what it is and why to use them over constructors?

3 points
Asked by:
Root-ssh
6631

What is static factory method in java? In the simplest way possible.

I've seen couple of times, it is better to use 'static factory'
then normal constructors - the question is why?

0 answers
Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.