I have below parent class :-
class Parent {
Parent() {
System.out.print("Parent ");
}
}
class Child extends Parent {
Child() {
System.out.print("Child");
}
}
So when i execute Child c = new Child();
My output should be "Child" Not "Parent Child"
can we do that using reflection API?
Requirement :- I have a long Junit Setup hierarchy Which I want to avoid for some of the classes