First, Scala overviewcan expand? Object Oriented? function-type programming compatible with Java Interop Syntax concise ? code line short ? ? abstract control statically typed can examine secure refactoring support concurrency control Customize other control structures Ii. installation of ScalaIdeEclipse (native support, use more complex)IntelliJ (expensive)NetBeans
mixed way, such as JRuby, Groovy, Clojure, and so on. Here's a good article that provides this example.Learning-oriented languageI have two habits, and in Scala's learning process, I have insisted on these two habits:Meet new technical terminology, access Wikipedia to understand more information, such as function literal (text function), referentially transparent (referential transparency), partial function (partial functions), Currying (Coriwa), there are many other terms.Refer to my understan
A concise course in Scala
Directory
Variable declaration
Function
Package Package
Data
String
Control process
Pattern matching
Object-oriented
Generic type
Annotations
Implicit
Empty Object Nil,null,null,unit,nothing,none
Scala is a multiple-paradigm (MULTI-PARADIGM) programming language.
Scala source code is compiled into Java bytecode, so it can run on top
Java programmers, why do you need to pay attention to Scala, Java programmers, and Scala?
Let's take a look at Martin Odersky's design goals for Scala. What aspects should be taken into account in the process of creating a language that surpasses Java?
Concession
Frank Sommers: You mentioned earlier that you want to create a language that exists in the Java
The relationship between Scala and Java, I think, can begin with a sentence: Scala comes from Java, but it's higher than Java.Scala's designer Martin Odersky is a Java control, the man who designed the Javac and wrote the common code in the JDK. It can be said that the Java language itself is Martin Odersky one step at
Tags: nbsp idea Big Data development GTK Target 1.3 website startup technology sharingStep Two: Install IntelliJ idea If 3 nodes such as Master, Slave1, Slave2, it is recommended to install it on the master nodeTo Https://www.jetbrains.com/idea download the corresponding version of the file,Because, I usually install the JDK myself, without the openjdk of CentOS, so I download the version as followsThen unzip it.The following is the directory where IntelliJ idea was installedThen proceed to the
Scala tutorial, scala Programming
The following is a complete scala getting started tutorial I have collected from the Internet. I have followed other programming basics to get started.
Compared with other languages such as Java, Scala is a complex language. It is a unity of object-oriented and function-oriented. It is
Scala supports scripts
1) create a file hello. Scala under/opt/Scala-script and edit the file as follows:
$ Hello, this is the first Scala script
2) run the script
The command line parameters of the scala script are saved in the sc
[TOC]
Array fixed-length arraysIf you need an array of the same length, you can use the arrays in Scala. For example:val numsArray = new Array[Int] (30) //长度为30的整数数组,所有元素初始化为0val stringArrays = new Array [String] (30) //长度为30的字符串数组,所有元素初始化为nullval sHello = Array("Hello", "World") //长度为2的Array[String]类型是推断出来的,已提供初始值就不需要newsHello(0) = "Hello Tom",使用()而不是[]来访问元素In the JVM, Scala's array is implemented as a Java array. The array in the example is of
Get a quick look at the Scala technology stackI was hopelessly a huge fan of Scala. After I used the Scala development project and wrote the framework, it seemed to condense into a huge black hole, and the attraction made me fly to it so that I started to deviate from Java. Although Java 8 for the Java camp added a glimmer of light, but it is wistfully, awaited b
Why do you write this blog?First of all, for the Spark project, it is highly recommended to build, with IntelliJ idea (Ultimate version), if you have another hobby to try Scala ideas for Eclipse, have time to play for yourself. But it's best to follow the crowd.For Hadoop projects, Eclipse is strongly recommended.Second, out of a Bo friends to give me the need to leave a message, in order to more efficient and high-quality help everyone, comb write do
工欲善其事, its prerequisite. This is also true for Scala, where you have to complete the installation of Scala and choose the right IDE before you start learning ScalaThis paper is mainly divided into two parts:Installation of 1.scala2.11.6 and use of REPLInstallation and use of the 2.Scala eclipse plugin1.scala2.11.6 installation and use of REPLThis section mainly d
1. Translating Java Classes to Scala ClassesExample 1:inch Javapublic class book{}# Scala equivalent of a class Declarationclass bookExample 2:# A Java class with a Construtorpublic class book{ int ISBN; Private final String title; Public book (int ISBN, String title) { = ISBN; = title; } int GETISBN () { return ISBN; } Public String GetTitle () { retu
open source ecosystems, Scala can integrate into existing IT environments without migrating.
Second, Scala is based on the Haskell and ML function principles, drawing heavily on the object-oriented concepts that Java programmers love. As a result, it can combine the advantages of two areas to provide significant benefits and not lose the familiar technology we have relied on.
Finally,
ObjectiveFirst of all, we want to emphasize one important thing at the outset: Scala's pattern matching occurs but is not limited to the match case statement block, which is one of the key factors that Scala pattern matching is important and useful! We will discuss this in detail in the latter part of the article.Types of pattern matchingThere are several types of pattern matching in Scala:
Wildcar
Scala is a strong static language that integrates object-oriented and functional features and can run on JVM. Because it can run on JVM and draw on a large number of Java language features during design, it can interact with Java and call Java-related class libraries, this makes great use of the intellectual investment of programmers who have mastered Java. It also draws on the elang function language and Ruby and other scripting languages to provide
[Big data from introductory to discard series tutorial] in Idea's Java project, configure and join Scala, write and run Scala's Hello WorldOriginal link: http://www.cnblogs.com/blog5277/p/8615984.htmlOriginal Author: Blog Park------Click on the menu below to view Big data Getting started all tutorialsBig data from getting started to giving upUrl:Http://www.cnblogs.com/blog5277/category/1179528.htmlSplit ***********************************In fact, the
Sublime3 Compile run Scala program
Using Sublime3 plus repl to invoke the command line, it is still convenient to run some code snippets. But direct compilation runs Scala programs, you need to add some settings.
1. Configuration:
Select Tools->build system->new build system and replace with:
{"cmd": ["D:\\scala\\bin\\scala.bat", "$file"]}
Save file:scala.
The main contents of this section
About Scala
Why to learn Scala
Scala language Preliminary
1. Introduction to ScalaThe Scala (Scala language abbreviation) language is a common programming language that runs on both the JVM and the. NET platform and can
Numeric type of 1.ScalaScala's numeric types are similar to Java's, and their scope is consistent with Java. Unlike Java, they are objects and are instances of the corresponding numeric classes. Scala provides powerful support for these numeric types through rich-Wrapper classes.1.1. Numeric typeScala's numeric type and range of values are shown in the table below.
Boolean:true or False
Byte:8 bit, signed (2-7 ~ 27-1)
Short:16 bit, si
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.