You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking at API for CompletableFuture, then I realized the .get() and .join() method are pretty similar.
.get() : Waits if necessary for this future to complete, and then returns its result.
.join(): Returns the result value when complete, or throws an (unchecked) exception if completed exceptionally.
I just wonder if there's any rules for using these two methods in different situation. Like is get() better than join() in some cases?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi all!
I was looking at API for CompletableFuture, then I realized the .get() and .join() method are pretty similar.
.get() : Waits if necessary for this future to complete, and then returns its result.
.join(): Returns the result value when complete, or throws an (unchecked) exception if completed exceptionally.
I just wonder if there's any rules for using these two methods in different situation. Like is get() better than join() in some cases?
Thanks!
The text was updated successfully, but these errors were encountered: