Java | Future vs CompletableFuture | Interview Question | Senior Java Developer | Lead Developer

Sdílet
Vložit
  • čas přidán 8. 09. 2024
  • Join this channel to get access to perks:
    / @prashantsharmaofficial
    Please like, share, and subscribe!!
    Document Link: mycodingcenter...

Komentáře • 6

  • @jungleman1012
    @jungleman1012 Před rokem +1

    This is a great tutorial. Thanks for your effort!!!

  • @VenkteshShivam
    @VenkteshShivam Před 2 lety +1

    ❤️

  • @ayeshabadepeer1593
    @ayeshabadepeer1593 Před rokem +1

    Could you please keep the document link which you refering in chat it would be good

  • @dineshbabu3227
    @dineshbabu3227 Před 2 lety

    18:12 doesn't make any sense to me. You just created a new completableFuture and it is not linked with the single thread executor you just created and submitted, The returned object from the STR should be assigned to completableFuture correct?

    • @PrashantSharmaOfficial
      @PrashantSharmaOfficial  Před 2 lety +1

      Is it necessary to link CompletableFuture with Single Thread Executor? This should answer your first question.
      To your second one - Yes, we can return an object/null but I tried to show a simple example which even beginners can understand.