File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

plz help me in this class question

 
jandost khoso
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic