void (String[] args) { <selection>Pojo1 p1 = new Pojo1("p1"); Pojo2 p2 = new Pojo2("p2"){ @Override public String getContent() { return "------------"; } }; </selection> System.out.println(p1.getContent() + p2.getContent()); }