Private class java | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
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
1 Respuesta
+ 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