What is the difference between future and future?

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.

+4
source share
1 answer

This is the same, and the future (lower case) is actually out of date from 2.11.0.

See the actual code in scala lang: https://github.com/scala/scala/blob/v2.12.0/src/library/scala/concurrent/package.scala#L101

+6
source

Source: https://habr.com/ru/post/1660925/


All Articles