当前位置:网站首页>Scala basics [introduction and installation]
Scala basics [introduction and installation]
2022-06-30 01:43:00 【hike76】
List of articles
One Scala introduction
1 What is? Scala
In English ,Scala Not a word , It is Scalable Language An abbreviation for two words , Express the meaning of scalable language . From a computer point of view ,Scala Is a complete software programming language , Then linking together means Scala Is a scalable software programming language . So it's scalable , Because this language embodies object-oriented , Functional programming and other different language paradigms , And it integrates the new features of different languages .
Scala The programming language was developed by the Federal Institute of technology in Lausanne (EPFL) Of Martin Odersky On 2001 Year based on Funnel The work began to design and develop . because Martin Odersky My previous work was to develop general purpose Java and Javac(Sun The company's Java compiler ), So based on the Java Platform Scala Language in 2003 end of the year /2004 Released early this year .
Scala Official website :https://www.scala-lang.org/
At present, the main batch computing engine framework of big data Spark Is based on Scala Language development , The main streaming computing engine framework Flink Also provided Scala Corresponding API, And the development efficiency of functional programming in the big data field is higher , More intuitive , Easier to understand .
Martin Odersky Is an avid compiler enthusiast , After a long time of programming , Hope to develop a language , It can make the process of writing programs simple , Efficient , So when it comes to Java After language , Feel the charm of this language , Decided to integrate the features of functional programming language into Java In language , And out of that came 2 Gate language (Pizza & Scala), These two languages have greatly promoted Java The development of language
- JDK1.5 The generic , enhance for loop , Automatic type conversion and so on are from Pizza New features introduced by the language
- JDK1.8 Type inference of ,λ(lambda) The expression is derived from Scala New features introduced by the language
It can be seen from the above that ,Scala Language is based on Java Developed , Therefore, the compiled file is also a bytecode file , And can run on JVM in .
2 scala install
(1) Environmental installation
install JDK1.8
Unzip the file :scala-2.12.11.zip, The unzipped directory should be free of Chinese and spaces
Configure environment variables



stay windows Run under cmd, Enter the following command , The following message appears, indicating that the installation is successful .
(2)Scala Plug in installation
By default IDEA I won't support it Scala Development of , Need to install Scala plug-in unit .
File-Settings- Search for Scala- Click the right button (install)
If the download is slow , Please visit the website :https://plugins.jetbrains.com/plugin/1347-scala/versions
(3)hello scala
① establish maven project
② increase Scala Framework support
By default ,IDEA When creating a project in... Is not supported Scala Development of , Need to add Scala Framework support .
Right click the project name , choice scala, take scala Install directory configuration 

③ Create a class
package com.hike.bigdata.scala.chapter01
object Scala01_HelloWorld {
def main(args: Array[String]): Unit = {
System.out.println("Hello Scala World")
}
}
边栏推荐
猜你喜欢

Ctfshow competition original title 680-695

The 8th "Internet +" competition - cloud native track invites you to challenge

JS reverse request parameter encryption:

Cookie encryption 12

什么是幂等性?四种接口幂等性方案详解!

C language irony
![【图神经网络】图分类学习研究综述[3]:图分类方法评价及未来研究方向](/img/b1/2afa73a14b2f41b7a65c4c2d261e6a.png)
【图神经网络】图分类学习研究综述[3]:图分类方法评价及未来研究方向

C语言 成绩排名

Conjecture of prime pairs in C language
![[machine learning Q & A] data sampling and model verification methods, hyperparametric optimization, over fitting and under fitting problems](/img/ec/de75eb8279604a57ef7d90406ad7c7.png)
[machine learning Q & A] data sampling and model verification methods, hyperparametric optimization, over fitting and under fitting problems
随机推荐
MySQL monitoring 6
AI落地制造业:智能机器人应具备这4种能力
JS prototype and prototype chain (Lantern Festival meal)
Ctfshow competition original title 680-695
What should be paid attention to in the design and production of the Urban Planning Museum
Three questions from the boss
Pytorch中transforms的用法整理
How to deal with occasional bugs?
Interview summary
对深度网络模型量化工作的总结
Cookie加密15 登录加密
魔百盒CM201-2-CH-Hi3798MV300-300H-EMMC和NAND_红外蓝牙语音_通刷固件包
手势数字启蒙学习机
C语言 说反话
Varnish foundation overview 1
The (3n+1) conjecture that C language kills people without paying for their lives
Cookie encryption 13
The first technology podcast month will be launched soon
Cookie encryption 12
Understand AQS principle (flow chart and synchronous queue diagram)