This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
This is my problem: if LastName map contains the key of this emp's lastname extract the value object(an arraylist) from the map and add the current emp object reference to it else instantiate a new arraylist and add the emp reference to it then add the last name key and the arraylist value object to the map Here is what I have so far:
The problem is that when I run into the second instance of a last name(inmy case smith) it throws a ClassCastException on this line: ((ArrayList)byLast.get(emp.getLastName())).add(emp); What should I do??? It does seem that this is the only forum that I can get serious answers to my problems and I truly appreciate that fact. So thatnk you to anyone who can help me straighten out my code. [ April 07, 2003: Message edited by: mike hengst ]
Thank you Oh Lord<br />For the white blind light<br />A city rises from the sea<br />I had a splitting headache<br />from which the future's made<br />--morrisson
Joined: Oct 19, 2002
I have solved the problem. It is adding everybody in now. Now onto the other errors. HA they nver end.