scala入门示例helloworld及idea中集成Scala库
生活随笔
收集整理的這篇文章主要介紹了
scala入门示例helloworld及idea中集成Scala库
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
新建maven工程:
集成Scala插件后,集成Scala庫到項目中:
集成scala后,會多下面的依賴:
pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.zxl</groupId><artifactId>practise</artifactId><version>1.0-SNAPSHOT</version></project>helloworld.scala:
package com.zxl.scala.chapter01object HelloWorld {def main(args: Array[String]): Unit = {println("hello world")} }?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
總結
以上是生活随笔為你收集整理的scala入门示例helloworld及idea中集成Scala库的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: golang中go mod使用第三方包
- 下一篇: Scala入门示例反编译分析代码执行流程