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

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ม.ค. 2025

ความคิดเห็น • 6

  • @jungleman1012
    @jungleman1012 2 ปีที่แล้ว +1

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

  • @dineshbabu3227
    @dineshbabu3227 2 ปีที่แล้ว

    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  2 ปีที่แล้ว +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.

  • @ayeshabadepeer1593
    @ayeshabadepeer1593 2 ปีที่แล้ว +1

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

    • @PrashantSharmaOfficial
      @PrashantSharmaOfficial  2 ปีที่แล้ว +1

      I've added that in the description now. Thanks for pointing it out!

  • @VenkteshShivam
    @VenkteshShivam 2 ปีที่แล้ว +1

    ❤️