public class Example { public void foo() { class Base { { System.out.println("This one is from @q3hardcore_"); } } class Test extends Base { { } } new Test(); } class Base { } }

Example compiled and jarred

I didn't discover this one, thank @q3hardcore_ for it <3

JD-GUI 1.4.0 // INTERNAL ERROR //

JD-GUI acts strangely in that Example will fail to decompile, but the subclasses will happily be. So it's not what might be expected, but it still allows code hiding

Fernflower @810818e public class Example { public void foo() { class Test extends Base { Test() { super(); } } new Test(); } class Base { } }

It's part of IntelliJ now. Aaaand reporting bugs seems like a huge and horrible nightmare >.>

CFR 0.105 /* * Decompiled with CFR 0_105. */ import java.io.PrintStream; public class Example { public void foo() { class Test extends 1Base { Test() { super(); } } new Test(); } class Base { Base() { } } }
Procyon 0.5.27 (via Luyten) import java.lang.System; public class Example { public Example() { super(); } public void foo() { class Test extends Example.Base { final /* synthetic */ Example this$0; Test() { this.this$0 = this$0; this$0.super(); } } new Test(); } class Base { final /* synthetic */ Example this$0; Base(final Example this$0) { this.this$0 = this$0; super(); } } }

Was reported and fixed