I was trying to figure out how to access variable values out of a class.

if class x.java hold all the values
can class y.java use getClass(??);
to get values without making a new class instance(which will erase everything?).
then class z.java access it later to get the values likewise?
What would that code have to look like?
thanks

you can use singleton design pattern

I was trying to figure out how to access variable values out of a class.

if class x.java hold all the values
can class y.java use getClass(??);
to get values without making a new class instance(which will erase everything?).
then class z.java access it later to get the values likewise?
What would that code have to look like?
thanks