Print Odd Even Numbers Using 2 Threads | Java Threading Explained | Java Interview Questions

Опубликовано: 15 Май 2026
на канале: BeginnerToTechBeast
6
1

Master one of the most asked threading problems in FAANG interviews! Learn how to print odd and even numbers using 2 separate threads with proper synchronization.

This is a classic concurrency problem that tests your understanding of thread coordination and locking mechanisms.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👋 HI, I'M JITENDRA | DSA & Java Developer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
I teach Data Structures, Algorithms, Java & Spring Boot
in the simplest way possible — with real code, dry runs,
and interview tips every video.
🔔 Subscribe & hit the bell so you never miss a video!
👉    / @devwithjk  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📂 SOURCE CODE & RESOURCES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📌 GitHub (All Source Code)
👉 https://github.com/jitendrak09310/You...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📚 MY PLAYLISTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔹Coding Interview Prep ⭐ | Must Solve Questions :
   • Java Coding Interview Prep ⭐ | Must Solve ...  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🌐 CONNECT WITH ME
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💼 LinkedIn → www.linkedin.com/in/jitendrak0
💼 Twitter → https://x.com/jitendrak09310
🐦 Website → https://jitendra-3rns.onrender.com/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⭐ SUPPORT THE CHANNEL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
If this video helped you:
✅ Like the video
✅ Share with friends preparing for interviews
✅ Star the GitHub repo ⭐
✅ Comment your doubts — I reply to every comment!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
All content is for educational purposes only.
Code shown is for learning — always test before
using in production.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#Java #CoreJava #DSA #CodingInterview #Programming #Algorithms #Multithreading #ThreadSynchronization #Interview