Thread Rating:
  • 0 Vote(s) - 0 Average
Share Thread:
Difference between future and completablefuture
#1
Future
The Future API was introduced in Java 5 to reference the result of an asynchronous computation. However, it didn't have any methods to combine computations or handle errors.

CompletableFuture
The CompletableFuture class was introduced in Java 8. It implements the Future and CompletionStage interfaces, and provides a set of methods for creating, chaining, and combining multiple Futures.
Reply
[-] The following 1 user Likes charlesprabhu's post:
  • DediRock
#2
(09-17-2024, 07:23 AM)charlesprabhu Wrote: Future
The Future API was introduced in Java 5 to reference the result of an asynchronous computation. However, it didn't have any methods to combine computations or handle errors.
CompletableFuture
The CompletableFuture class was introduced in Java 8. It implements the Future and CompletionStage interfaces, and provides a set of methods for creating, chaining, and combining multiple Futures.


Do you often use it for asynchronous programming? Any favorite methods or use cases?
[Image: ssi5pQG.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)
[-]
Ad

[-]
Top Articles
100+ Social Bookmarking Sites List
55+ Image Submission Sites List

[-]
Recent Posts
https://support.inkling.com/hc/en-us/community/posts/32396363388557-Sa...
Tomhardy4455 — 09:46 PM
https://support.inkling.com/hc/en-us/community/posts/32396333880589-kN...
Tomhardy4455 — 09:45 PM
https://support.inkling.com/hc/en-us/community/posts/32396318184589--H...
Tomhardy4455 — 09:44 PM
https://support.inkling.com/hc/en-us/community/posts/32396254905357-Sa...
Tomhardy4455 — 09:44 PM
https://support.inkling.com/hc/en-us/community/posts/32395165873165-Ho...
Tomhardy4455 — 09:43 PM

[-]
Follow us on Facebook