java objects, shared variables
Posted
by raven
on Stack Overflow
See other posts from Stack Overflow
or by raven
Published on 2010-05-09T17:26:34Z
Indexed on
2010/05/09
17:38 UTC
Read the original article
Hit count: 195
hello, I have a simple question here. If I declare a variable inside an object which was made [declared] in the main class, like this:
public static int number;
( usually I declare it like this :
private int number;
)
can it be used in a different object which was also made [declared] in the main class? btw I do not care about security atm, I just want to make something work, don't care about protection)
© Stack Overflow or respective owner