Skip to content

Commit ac3146a

Browse files
add helloworld scala
1 parent 0a6d95f commit ac3146a

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

Scala/helloV2.scala

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
object HelloWorld {
2+
def main(args: Array[String]): Unit = {
3+
println("Hello, World!")
4+
}
5+
}

Scala/helloV3.scala

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@main def HelloWorld(args: String*): Unit =
2+
println("Hello, World!")

Scala/readme.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Scala Hello World
2+
3+
Scala combines object-oriented and functional programming in one concise, high-level language. Scala's static types help avoid bugs in complex applications, and its JVM and JavaScript runtimes let you build high-performance systems with easy access to huge ecosystems of libraries.
4+
5+
# run the program
6+
7+
you need to install Scala .
8+
9+
you can found how to install Scala at: [https://www.scala-lang.org/download/](https://www.scala-lang.org/download/)
10+
11+
for run the program, you can use the command for compiling :
12+
13+
```
14+
scalac helloV2.scala
15+
```
16+
17+
and run this command to running
18+
19+
```
20+
scala -classpath . HelloWorld
21+
```

0 commit comments

Comments
 (0)