You are attempting to reference a non-static inner class from a static context. Either access class 3 from the outer class, or declare class 3 as static.