- Learning Scala Programming
- Vikash Sharma
- 106字
- 2021-06-30 19:07:51
AnyRef
The AnyRef class represents all values that are/can be represented as objects in the underlying runtime system. It includes all user-defined classes that explicitly do not inherit from AnyVal. Some standard reference classes are String, Tuple, Function, and Array. The Scala compiler either provides syntactic sugar for them, or generates special code at the time of compilation for their operations. We've already seen a bit of syntactic sugar such as Tuple2, which can be represented as (A, B) where A and B are type parameters. An applied form of this Tuple2 can be (String and Int). In Scala, we represent this as Tuple2[String, Int].
推薦閱讀
- Spring Cloud Alibaba核心技術(shù)與實(shí)戰(zhàn)案例
- 工程軟件開發(fā)技術(shù)基礎(chǔ)
- Vue.js前端開發(fā)基礎(chǔ)與項(xiàng)目實(shí)戰(zhàn)
- Troubleshooting PostgreSQL
- Lift Application Development Cookbook
- 實(shí)驗(yàn)編程:PsychoPy從入門到精通
- 算法超簡(jiǎn)單:趣味游戲帶你輕松入門與實(shí)踐
- Building Clouds with Windows Azure Pack
- WCF全面解析
- 系統(tǒng)分析師UML用例實(shí)戰(zhàn)
- Java EE互聯(lián)網(wǎng)輕量級(jí)框架整合開發(fā):SSM+Redis+Spring微服務(wù)(上下冊(cè))
- Mastering React Test:Driven Development
- 程序員超強(qiáng)大腦
- .NET應(yīng)用架構(gòu)設(shè)計(jì):原則、模式與實(shí)踐
- Java程序設(shè)計(jì)