0

Private class java

In java, you can prevent a client from making new instances of your utility class by declaring a private constructor. Is this true?

29th Nov 2019, 6:00 AM
Fatih Oztunc
Fatih Oztunc - avatar
2 ответов
+ 5
Yes, it is true and you can also test it easily. https://code.sololearn.com/ciV66oI9326o/?ref=app
29th Nov 2019, 6:13 AM
Tibor Santa
Tibor Santa - avatar