Results 1 to 3 of 3
Thread: arrays and/ are objects
- 01-02-2013, 02:39 PM #1
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 570
- Rep Power
- 6
arrays and/ are objects
Have been away from JAVA over four years (wow, how did our world change), and picking up programming again!
I have lost some understanding of things and here is my small problem…
Here is the actual situation:
-there are 3 classes A,B and C
-class B declares an array:
1) int[] xpt; // in the header of the class;
2) xpt = new int[7]; // at the constructor of that class;
3) class A initiates an object of class B and the arrays gets filled by mouse clicks (works fine);
4) When I want to get hold of that array in class C, what do I do….
Initiating (another) object of class B (in C) the array class will call the constructor and "delete" the values of the "original" array…..
What a mess?
thanks for any help (any of the old folks still around?)
BTW all classes are in the same packet and the first class is actually an applet (that works up to here)
again what a mess!
- 01-02-2013, 03:53 PM #2
Senior Member
- Join Date
- Dec 2007
- Location
- Spain
- Posts
- 570
- Rep Power
- 6
Re: arrays and/ are objects
Need to add this to it:
next step is that I have to have the array data also in class C
- 01-02-2013, 04:20 PM #3
Member
- Join Date
- Dec 2012
- Posts
- 12
- Rep Power
- 0
Similar Threads
-
GUI, Arrays, Objects, and Components
By jazob in forum New To JavaReplies: 6Last Post: 01-18-2012, 11:25 PM -
Arrays of Objects
By superscout in forum New To JavaReplies: 2Last Post: 01-15-2012, 02:16 PM -
How to use class objects in arrays
By dironic88 in forum EclipseReplies: 6Last Post: 04-06-2011, 01:34 PM -
scanner objects with arrays again..
By nevermiind in forum New To JavaReplies: 18Last Post: 05-24-2010, 11:45 AM -
Objects and Arrays
By bannow in forum New To JavaReplies: 3Last Post: 04-19-2010, 07:15 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks