- Learn Kotlin Programming(Second Edition)
- Stephen Samuel Stefan Bocutiu
- 62字
- 2021-06-24 14:13:27
Import renaming
Import renaming is especially useful when common names are used by multiple libraries, such as java.io.Path and org.apache.hadoop.fs.Path:
import com.packt.myproject.Foo import com.packt.otherproject.Foo as Foo2 fun doubleFoo() { val foo1 = Foo() val foo2 = Foo2() }
If two different packages each use the same name, then we can use the as keyword to alias the name.
推薦閱讀
- Beginning Java Data Structures and Algorithms
- C語言程序設計案例精粹
- Java Web程序設計任務教程
- C語言程序設計同步訓練與上機指導(第三版)
- MongoDB,Express,Angular,and Node.js Fundamentals
- Java Web開發詳解
- Machine Learning in Java
- Learning Material Design
- ASP.NET求職寶典
- 數據科學中的實用統計學(第2版)
- H5頁面設計與制作(全彩慕課版·第2版)
- Python程序設計:基礎與實踐
- 樹莓派開發從零開始學:超好玩的智能小硬件制作書
- 軟件再工程:優化現有軟件系統的方法與最佳實踐
- Instant AppFog