Yes it can be private by creating static factory method and returning object and in main access that static method and we will access the private constructor

Yes, that's true... but did you have any particular reason for sharing that today?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.