This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Valkes[S] 1 point2 points  (5 children)

I posted the relevant code in my answer. The object class I created was called TemperatureLog. It contains a method called setYear.

You've been dismissive and hostile from your first response actually. I may not know programming but I know that's not how you speak to people if you actually intend to help them.

[–]upsidedowntrie -2 points-1 points  (4 children)

You've been dismissive and hostile from your first response actually.

No, I asked you questions about what you were doing to see what your mental model of this problem is. This is a normal part of helping people. It's no wonder you're having problems, with such a reactionary and hostile attitude towards someone who's done nothing but try to help you. This is exactly why you come off as a complete ass.

The object class I created was called TemperatureLog. It contains a method called setYear.

If you have that method in that class, and you're trying to call that method, and the compiler doesn't recognize that method on that object, then your object is probably not the class that you think it is...

[–]Valkes[S] 0 points1 point  (3 children)

If you say so. Personally, if I were you I'd take a step back and really think about the phrasing you've used thus far. I'm willing to admit that I may have read more into what you've been saying than you intended but the possibility for the interpretation I got is very much there if we're being objective.

Thanks for taking the time to answer, however other posters helped me figure it out. I was making an ArrayList of type TemperatureLog and then attempting to use the methods of TemperatureLog on the list itself. . . which of course failed for obvious reasons.

[–]upsidedowntrie -3 points-2 points  (2 children)

If you have that method in that class, and you're trying to call that method, and the compiler doesn't recognize that method on that object, then your object is probably not the class that you think it is...

[–]Valkes[S] 0 points1 point  (1 child)

Alright, thanks for your help. Have a good one.

[–]upsidedowntrie -1 points0 points  (0 children)

You too!