Results 1 to 2 of 2
- 07-07-2010, 07:36 PM #1Member
- Join Date
- Apr 2010
- Rep Power
Access Public Global Variables in class
I wrote a class Ex1 that has a public double variable. It's global, therefore it's defined outside of any method. Now, can I get access to this variable in another class, called Ex2? If so, what is the syntax to do this? For example, if I make an new instance of Ex1 inside of Ex2, can I access these variables since they are not method?
Duplicate post and is locked. To be deleted later.
- By spatel14 in forum New To JavaReplies: 5Last Post: 07-08-2010, 10:50 AM
- By ribbs2521 in forum New To JavaReplies: 4Last Post: 10-22-2009, 05:45 PM
- By Madushan in forum New To JavaReplies: 3Last Post: 03-14-2009, 08:22 AM
- By blackstormattack in forum New To JavaReplies: 1Last Post: 03-08-2009, 08:19 PM
- By eva in forum New To JavaReplies: 3Last Post: 12-23-2007, 01:11 AM