public class Test{ void foo() { String s = D.xxx + "yz"; } static class D { public static final String xxx = "xxx"; } }