And I don't see in that code anything like Mohamed's suggestion.
(By the way I put your code into the "Code" tags so it wasn't totally unreadable any more. There's a "Code" button at the top of the posting box for your future use.)
Edit: Also, looking at that now-readable code, I don't see why you think you need a HashMap of any kind.
And once you answer that, compare your answer to what you put in your code.
Eli Andrus wrote:The Key would be type persons(string) of course, and V(value), each value would be any array that contains all of the mail items stored for this person(referring back to person of key) I guess Im just wondering how I should form this, Im new to coding, and just need the type of structure I guess.
let me give you a head start
Update: I think I just repeated what Rajagopal Mani had posted before. May be both these posts should help you?
Also try to code a simple example, understand how and why it works. Then you can improve the code to suit your requirement.
So: does line 9 adhere to this agreement?
Eli Andrus wrote:also I'm sorry, it won't let me put the code into a box( I don't know how to do that yet)
I fixed the code tags in your last post. It really isn't hard to do it. Let me tell you two ways:
(1) Paste your code in the box where you're typing your reply. Select it by dragging your mouse over it. Click the "Code" button at the top.
(2) Click the "Code" button at the top. You'll see something like "[ code=java][/code]" Put the cursor between the opening tag and the closing tag, i.e. between "]" and "[". Paste your code.
If you have a List as a “V”, you need to find the List. Use this pseudocode:
is an incompatible type. it found a java List, but was expecting a ArrayList.
because when you do- map.get(someKey) it returns a List item and in turn you are trying to assign a List instance to a ArrayList reference which is a violation of rule.
"Subclass instances can be assigned to Super class reference, but the other way is not possible"
here is the code for the other class;
the code that I had to change in the class we have been working with was initially this;
Although it is having a problem with line 10 in the first part of the code(from the other class)
it says that post in mail server cannot be applied to (MailItem)
-do you know what this means? or what I should do more like it?
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
Rocket Oven Kickstarter - from the trailbosshttps://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss