Kjetil S. Matheussen wrote:
Thanks! Changing to boolean fixed it. I didn't know about boolean. But I
wonder something fishy may be going on anyway?
Yes. Your Java program is undefined. You're calling start from a
Thread's constructor. Don't do that. In this case, you're creating
a new thread in the super-class constructor, when then calls getData.
At the "same time" the original thread returns from the superclass
constructor, and continues the derived constructor, which means
initializing the isplaying field. So it is undefined whether the
isplaying field is set before or after it is accessed.