public int PRINT_NUMBERS_UPTO=10; static int number=1; int remainder; static Object lock=new Object(); OddEvenRunnable(int remainder) { this.remainder=remainder; } @Override public void run() { while (number < PRINT_NUMBERS_UPTO) { synchronized (lock) { while (number % 2 != remainder...
Find the average of all the odd numbers and all the even numbers from 1 to 45. View Solution What is the average of all numbers between 100 and 200 which are divisible by 13 ? View Solution View Solution View Solution View Solution ...