M.Regmi M.Regmi - 1 year ago 69
Scala Question

What is the difference between Future and future?

I am new to scala.In Future, I saw it used in two different way i.e Future and future.


val sayHello = Future {


val sayHello = future {

But I didn't find any difference in Output. I will be pleased if anybody

makes it clear to me.

Answer Source

It is the same thing indeed, and future (lowercase) is actually deprecated since 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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download