94

Kotlin之美——高效篇 - 简书

 6 years ago
source link: https://www.jianshu.com/p/9d6a7d6890b3?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Kotlin 作为后起之秀,站在巨人们的肩膀上是她得天独厚的优势,而这个巨人也包括—《Effective Java》,得益于这个巨人,Kotlin 到处散发着高效的味道,这篇文章让我们一起来领略下 Kotlin 的高效之道。 第1条:考虑使用静态工厂方法代替构造器 在实例化对象的方式中,使用静态工厂方法相比构造器有几个好处: 工厂方法拥有名字,易于开发者理解。 不必在每次调用的时候都创建一个...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK