I am new to scala. In the future, I saw how it was used in two different ways. The future and the future.
Example:
val sayHello = Future {
Thread.sleep(1000)
"hello"
}
Similarly
val sayHello = Future {
Thread.sleep(1000)
"hello"
}
But I did not find the difference in Output. I will be glad if anyone
makes me understand.
source
share