Java code achieves two levels of linkage