My simple School class looks like this:
public class School{
...
public static class Student{
public void register(){
...
}
}
}
As you see above, the School class has a inner public static class named Student. There is a method register() defined in Student.
In my main function, I am able to load the inner static Student class by:
Class<?> studentClass = Class.forName("School$Student");
I am wondering, with the above line of code, how could I invoke the register() function in java reflection way.