public class FriendClass { public static void main(String[] args) { Father f = new Father(); Father.Son s = f.new Son(); Father.Son.Grandson g = s.new Grandson(); g.out(); } }