Cystom class in an array?
I was wondering if it was possible to put a custom class in an array. So that way you could do like:
Code:
//something.java
class something {
boolean visible;
int x,y;
}
//blah.java
//...
something[4].x = 40;
something[4].y = 30;
something[4].visible = true;
//...
Re: Cystom class in an array?
Re: Cystom class in an array?
Would be better practice however to work more OO. Create methods and private variables to abstract actually changing private data explicitly when working outside the class.