On 8 January 2011 02:30, Ernest Friedman-Hill <[email protected]> wrote:
>
> On Jan 7, 2011, at 8:06 PM, Michael Eugene Artz wrote:
>
>
> public Profile getProfile(int profileNumber)
>> {
>> //return new Profile(1, "Mike", "Artz");
>> return (Profile)profiles.get(new Integer(profileNumber));
>> }
>>
>>
> Which is what the error says: the values are Booleans, not Profiles. The
> trace tells you exactly what line causes the errors, so a println() or two
> would have easily told you the whole story.
>
Or use generics with constraining types, and the Java compiler will tell
you.
-W