How can I properly compose my POJOs using inheritance or another approaches?

前端 未结 0 1731
孤独总比滥情好
孤独总比滥情好 2021-02-06 04:16

I have two POJO-classes with almost same fields, e.g.:

public class B {
private String string1;
private String string2;
// getters, setters, equals, toString
}

p         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题