File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes plz help me in this class question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "plz help me in this class question" Watch "plz help me in this class question" New topic
Author

plz help me in this class question

jandost khoso
Greenhorn

Joined: Nov 26, 2001
Posts: 6
i want to make an array that stores objects which have some differnt properties, whereas each object is itself an array which is formed from different objects that have properties.
how can i do that.
also i want to make a method that if i print one object of first array all objects and sub objecs be printed.
Raj Kumar
Ranch Hand

Joined: Oct 26, 2001
Posts: 70
If the size of the array is known beforehand, u can just create a 2 dimension array of Objects.
Object[][] obj = new Object[i][j];
Else u can use Vector, and store a Vector in each of its elements.
-----------------------------
also i want to make a method that if i print one object of first array all objects and sub objecs be printed.
-----------------------------
For this just make the method loop thru all the elements and call print on each element.


- Raj (SCJP, SCWCD, SCEA-I, SCBCD, IBM XML, IBM 483)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: plz help me in this class question
 
Similar Threads
Get java.util.List from webservice
Array Objects through JDBC
Object array
need to find index of element in multidimensional array
removing an object from an array