Parent class
@Getter
@Setter
public class BaseChapter {
protected String chapterId;
private List<BaseSection> sections;
}
**Child class **
@Getter
@Setter
public class Chapter extends BaseChapter {
private Integer title;
private List<Section> sections;
}
I'm using springboot and java 11 ,I need to use sections variable in both baseChapter and Chapter class I use both classes in two diffrent APIs.but i got error when doing this.how to overcome this problem