Builder模式的演示 package com.mozq.mb.mb01.pojo; /* 类的某些参数给出了默认值,但是一旦设置了就不可变.使用Builder模式来创建. */ public class ImageConfig { private final int x; private final int y; private final int width; private final int height; private final String fileDiskPath; publ…