February 2018
Intermediate to advanced
552 pages
13h 46m
English
We have discussed lots of theory so far. It's good to start developing some examples to understand the Scala Future API. Let's start now with the Scala Hello World Future App:
Project Name: scala-future-app
build.sbt:
name := "scala-future-app"
version := "1.0"
scalaVersion := "2.12.3"
object ScalaFutureHelloWorldApp extends App{ }
ScalaFutureHelloWorldApp.scala:
import scala.concurrent.Future object ScalaFutureHelloWorldApp extends App{ val helloWordlFuture = Future("Hello World") }
[error] .../scala-future- app/src/main/scala/com/packt/publishing/concurrent/future/ScalaFutureHelloWolrdApp.scala:8: ...