First off if I was going to take input from System.in using a scanner, and I only wanted it to accept the commands cmd:selectItem, cmd:listItem.
Would i use a case statement which then has a default clause throw new exception e. which would be thrown if a command that wasn't recognized was entered.
Secondly if i wanted to implement more commands to work on my Collection<items> such as countItems, this would then lead to a thread being created which will carry out the activity in the background, can someone tell me how to create the threads concurrecntly e.g thread pool?
For example if i wanted to findITEMname. And status was an array in item that contained several names, how would I get round the problem if multiple calls of findITEMname were called.
Any help is greatly appreciated. Peace.
Social Networking Bookmarks