`

Agile Java Notes

    博客分类:
  • Java
阅读更多

1.不要将集合对象的类型直接对外暴露

例如 

CourseSession

不要提供

public List<Student> getAllStudents()

转而用get代替

public Student get(int index)()

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics