immutable class

1.所有数据域都是私有

2.没有set方法

3.get方法应该返回基本类型的值或者引用类型的副本(clone)

posted @ 2022-01-24 15:56  Inami  阅读(30)  评论(0)    收藏  举报