- 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.
推薦閱讀
- 密碼學(xué)原理與Java實(shí)現(xiàn)
- 機(jī)器學(xué)習(xí)系統(tǒng):設(shè)計(jì)和實(shí)現(xiàn)
- Getting Started with ResearchKit
- 算法精粹:經(jīng)典計(jì)算機(jī)科學(xué)問題的Java實(shí)現(xiàn)
- 我的第一本算法書
- Building a Recommendation Engine with Scala
- STM32F0實(shí)戰(zhàn):基于HAL庫開發(fā)
- Spring Boot企業(yè)級(jí)項(xiàng)目開發(fā)實(shí)戰(zhàn)
- Cybersecurity Attacks:Red Team Strategies
- OpenCV 3 Blueprints
- 高效使用Greenplum:入門、進(jìn)階與數(shù)據(jù)中臺(tái)
- Learning WordPress REST API
- JavaWeb從入門到精通(視頻實(shí)戰(zhàn)版)
- 虛擬現(xiàn)實(shí):引領(lǐng)未來的人機(jī)交互革命
- 零基礎(chǔ)入門學(xué)習(xí)C語言:帶你學(xué)C帶你飛