Jeff Verdegan wrote:
Aaron Ng wrote:
it won't do what its suppose to do
Yes, you've mentioned that.
the test will fail and it won't return true unless i'm doing something wrong
Ah, NOW we're getting somewhere.
So, presumably you're expecting this test:
to evaluate to true, because of "SHOP AT OUR ONLINE PHARMACY", right?
Two questions:
1) Are you sure that parameter corresponds to the subject of the MailItem?
2) If it does, do you think that
"SHOP AT OUR ONLINE PHARMACY".equals("Online Pharmacy") should be true? That is, do you think that "SHOP AT OUR ONLINE PHARMACY" is in fact equal to "Online Pharmacy"?
I'm hoping that this will make it clear to you what the nature of your logic error is. If it does, then your next step is to search through the docs for java.lang.String and see what methods it has that might more closely match what you're really trying to do. If you still don't understand the problem, post again.
i got it all working for that part now thanks
now the second question is how do i implement it when i tried it it says that a static content won't work on non static content
here is the code (from the MailServer Class) unless i am implementing the method in the wrong place