public class Test { public static void method() { class GenericLocal { } GenericLocal instantiated = new GenericLocal<>(); } }