Can we access private constructor of first class​ in second to create Object of first class? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can we access private constructor of first class​ in second to create Object of first class?

Deep Java & Spring knowledge required

9th Aug 2019, 9:40 PM
Nilesh Shinde
Nilesh Shinde - avatar
2 Answers
+ 1
Possible by using reflection API and factory method
10th Aug 2019, 8:57 AM
Gajanan Hingne
Gajanan Hingne - avatar
+ 1
Ya it is possible by reflection api
9th Aug 2019, 10:23 PM
Nilesh Shinde
Nilesh Shinde - avatar