博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
scala编程_Scala概述| Scala编程教程
阅读量:2532 次
发布时间:2019-05-11

本文共 3170 字,大约阅读时间需要 10 分钟。

scala编程

Scala is a programming language developed by . It came into the market in 2003. Scala Stands for Scalable Language. Scala is a based programming Language which is much easier to code than . So is treated as future replacement of Java in enterprise software development.

Scala是 开发的一种编程语言 。 它于2003年投放市场。Scala代表可扩展语言 。 Scala是一种基于的编程语言,比更容易编码。 因此被视为企业软件开发中Java的未来替代品。

Features of scala programming language

Scala编程语言的功能

Some features of Scala are:

Scala的一些功能包括:

  • It runs on JVM but compiler is different.

    在JVM上运行,但编译器有所不同

  • Integrates Features of both Object-Oriented Programming and Functional Programming.

    集成了面向对象编程和函数式编程的功能

  • Lazy Computation, it increases performance, the expression evaluates only when its evaluation is required.

    延迟计算,它提高了性能,仅在需要评估时才对表达式进行评估。

  • Immutability: it means the value of a data cannot be changed by default.

    不变性 :这意味着默认情况下无法更改数据的值。

  • Case Classes and Pattern Matching.

    案例分类和模式匹配。

  • Type Interface: It recognizes data type and functions return type itself.

    类型接口 :它识别数据类型,函数本身返回类型。

  • Concurrency Control: Scala Provide concurrency control using actor model.

    并发控制 :Scala使用actor模型提供并发控制。

  • High Order Function: A function that works on another function.

    高阶功能 :可以在其他功能上使用的功能。

Coding in Scala is easier than Java and it saves a lot of coding because of the above feature and gives a more efficient program.

Scala中的编码比Java容易,并且由于上述功能,它节省了大量代码,并提供了更高效的程序。

Scala is a general-purpose language can be used anywhere. It runs on JVM that means its byte code can replace java. So, Java Application can be made using Scala also.

Scala是一种通用语言,可以在任何地方使用。 它在JVM上运行,这意味着其字节码可以代替java。 因此,也可以使用Scala来创建Java应用程序。

安装Scala (Installation of Scala)

Scala installation is very easy. It can be installed on both Windows and Linux based systems. As it sits on top of Java, it requires Java to be installed on your system before installation.

Scala的安装非常简单。 它可以安装在基于Windows和Linux的系统上。 由于它位于Java之上,因此需要在安装系统之前先将Java安装在系统上。

Requirement: JAVA 1.8 Or Above

要求: JAVA 1.8或更高

Steps to Install

安装步骤

Step 1: Check for Java on your System, Run the following command in your Command Prompt or Terminal

步骤1:在系统上检查Java,在命令提示符或终端中运行以下命令

For Windows , \>java –version    For Linux, $java –version

If you have Java installed on your system the version of Java Will prompt otherwise you need to install java on your system.

如果您的系统上安装了Java,则Java版本将提示您,否则需要在系统上安装Java。

Just Go To oracle, Menu -> Product -> Java.

只需转到oracle,菜单->产品-> Java。

Step 2: Set your java environment variable JAVA_HOME to your java install location.

步骤2:将Java环境变量JAVA_HOME设置为Java安装位置。

For this use the following Command,     For Windows, Set JAVA_HOME to C:\ProgramFiles\java\jdk1.7.0_60    For Linus, Export JAVA_HOME=/usr/local/java-current

Step 3: Install Scala, download Scala from

A jar file will download. After it's Downloaded Run the command to install this Jar File on your system,

第3步:安装Scala,从下载Scala

一个jar文件将下载。 下载完成后,运行命令在系统上安装此Jar文件,

For Windows, \>java –jar scala-2.11.5-installer.jar\>    For Linux, $java –jar scala-2.9.0.1-installer.jar

Check for Scala installation on your system using following commands,

使用以下命令检查系统上的Scala安装,

For Windows , \>scala –version    For Linux, $scala –version

翻译自:

scala编程

转载地址:http://apvzd.baihongyu.com/

你可能感兴趣的文章
LimeJS指南3
查看>>
关于C++ const成员的一些细节
查看>>
《代码大全》学习摘要(五)软件构建中的设计(下)
查看>>
C#检测驱动是否安装的问题
查看>>
web-4. 装饰页面的图像
查看>>
微信测试账户
查看>>
Android ListView上拉获取下一页
查看>>
算法练习题
查看>>
学习使用Django一 安装虚拟环境
查看>>
Hibernate视频学习笔记(8)Lazy策略
查看>>
CSS3 结构性伪类选择器(1)
查看>>
IOS 杂笔-14(被人遗忘的owner)
查看>>
自动测试用工具
查看>>
前端基础之BOM和DOM
查看>>
[T-ARA/筷子兄弟][Little Apple]
查看>>
编译Libgdiplus遇到的问题
查看>>
【NOIP 模拟赛】Evensgn 剪树枝 树形dp
查看>>
java学习笔记④MySql数据库--01/02 database table 数据的增删改
查看>>
两台电脑如何实现共享文件
查看>>
组合模式Composite
查看>>