It's said in the K&B's book,
Constructor can use any access modifiers, including private. (A private constructor means only code within the class itself can instantiate an object of that type, so if the private constructor class wants to allow an instance of the class to an instance created within the class
I don't have c clear understand in that bold para. And see the below coding....
makes a Compilation error as I expected [
ClassA(int) has private access in ClassA]. What is the solution? Thanks in Advanced!