1 2 3 4 5 6 7 8 9 10 11 12 13 14
package com.example; public class StaticNestedClass { public static int value() { IntSupplier supplier = new IntSupplier(); return supplier.get(); } private static class IntSupplier { public int get() { return 42; } } }