← Oracle questions

Print odd and even numbers sequentially using two threads

Filed under Oracle

Write a program with two threads to print numbers from 1 to N, where one thread prints odd numbers and the other prints even numbers, maintaining the sequence 1, 2, 3, 4...

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Oracle questions

Collected from public candidate posts and coding forums. Updated Nov 2026.