Threads Interview Report
- 0of 0 votes
AnswersJAVA Question:
- SK October 28, 2012 in United States
There is one class which extends Thread and it takes "Symbol (Clubs, Heart, Dice, Spade)" as a parameter in constructor.
We've four threads one each for each symbol. Now they want to print as given below:
Dice A
Hearts A
Spade A
Clubs A
Dice 2
Hearts 2
Spade 2
Clubs 2
and so on...
How to achieve this. I thought of using wait/notify, but we've to some how make sure that each thread gets run in a particular order to print this.| Report Duplicate | Flag | PURGE
Threads - 0of 0 votes
AnswersIn a hashmap, how to delete all the odd entries? i.e, if hash map contains key1, value1, key2, value2, key3, value3, ... we've to delete all the odd entries, that is to remove all the keys alone without deleting values
- SK October 28, 2012 in United States| Report Duplicate | Flag | PURGE
Java
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.