Should my Java class expose a constructor?

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2023
  • Accessible constructors might not be the best way to let client code create instances of your classes. A factory can insulate client code against the consequences of certain changes, and is simple to implement. This video discusses the reasoning, and a simple implementation of factory.

ความคิดเห็น •