Variable not initialized?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Variable not initialized?

Mikey2520
I am implementing Screen but the complier keeps telling me my color variable is not found.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Variable not initialized?

cadet1620
Administrator
field defines a class instance variable. That variable will only exist in objects of that class type, and can only be referenced in the class constructors and methods.

Your 'color' variable needs to be static, like "twoToThe".

--Mark
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Variable not initialized?

Mikey2520
Thank you so much!!!!!
Loading...