2

I'm trying to understand the difference between these two methods, but they seem similar to me. Even javadocs are pretty much the same

a3dsfcv
  • 1,146
  • 2
  • 20
  • 35

1 Answers1

5

The difference is between the parameters you use in the methods.

If you use a Callable, it computes a result or throws an exception if unable to do so.
If you use a Supplier you get a result.

There is also another nice post where this topic is discussed.

Flightkick
  • 137
  • 1
  • 1
  • 9
flaxel
  • 4,173
  • 4
  • 17
  • 30