语言风格 这里整理了 kotlin 惯用的代码风格,如果你有喜爱的代码风格,可以在 github 上给 kotlin 提 pull request . 创建DTOs(POJSs/POCOs) 文件: data class Customer(val name: String, val email: String) 上述代码提供了一个包含以下功能的 Customer 类: getters (and setters in case of vars) for all properties equals(…