Here, the inner class is not static, so you need to instantiate the outer class, and then call a new one,
A a = new Test2().new C();
But in this case, you can make the inner class static,
static class C extends B implements A
then it's ok to use
A a = new C()
source share