Question on Java

How to access protected method if class has only private constructor?
October 14th 19 at 10:43
3 answers
October 14th 19 at 10:45
This can be done using Java Reflection.
October 14th 19 at 10:47
From another class in the same package can.
October 14th 19 at 10:49
No way. A class with only private constructor cannot be inherited.
Although you can access it from any class from the same package as him. - Ida.Hane commented on October 14th 19 at 10:52

Find more questions by tags Java