Results 1 to 2 of 2
Thread: Passing array objects
- 12-03-2009, 02:37 PM #1
Member
- Join Date
- Nov 2009
- Posts
- 9
- Rep Power
- 0
Passing array objects
Hello all,
I am stuck. I need to pass array objects from my main to another class and don't know how. I'm writing a real estate listing program that starts off with a menu and the user selects an option.
So in my main I have
and was wondering how to pass the array to another class so I could use it to say,... display sold listings, etc..Java Code:PropertyListing currentListings [] = {new PropertyListing(1001, 'H', "Barrhaven", "Bungalow", 230000), new PropertyListing(1445, 'L', "Orleans", "50 x 90 service lot", 50000), new PropertyListing(1888, 'L', "Carp", "1/4 acre", 90000), new PropertyListing(2933, 'H', "Kanata", "2 storey", 380000), new PropertyListing(2948, 'L', "Kemptville", "1/2 acre", 49000), new PropertyListing(2966, 'H', "Barrhaven", "Townhouse", 260000), new PropertyListing(2998, 'H', "Orleans", "Bungalow", 310000), new PropertyListing(3010, 'H', "Glebe", "2 storey", 980000), new PropertyListing(3011, 'H', "Riverside South", "Townhouse", 255000), new PropertyListing(3014, 'L', "Renfrew", "1 1/2 acre", 89000)};
- 12-03-2009, 02:40 PM #2
You pass them like any other object, no difference.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
Similar Threads
-
Passing Objects
By Java_Developer in forum New To JavaReplies: 6Last Post: 10-29-2009, 01:32 PM -
MVC passing objects
By simo_mon in forum New To JavaReplies: 1Last Post: 07-17-2009, 06:57 AM -
help with passing objects between classes
By aruna1 in forum New To JavaReplies: 7Last Post: 03-22-2009, 02:41 PM -
Passing objects in Java
By jbostjr in forum New To JavaReplies: 1Last Post: 10-30-2007, 10:15 PM -
Passing objects in Java
By jbostjr in forum Advanced JavaReplies: 1Last Post: 10-30-2007, 05:57 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks