aspose file tools*
The moose likes Beginning Java and the fly likes array of object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "array of object" Watch "array of object" New topic
Author

array of object

abalfazl hossein
Ranch Hand

Joined: Sep 06, 2007
Posts: 606

There is error in creating array. why?



Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19541
    
  16

Did you put this code in a method or constructor? Can you post the compiler error?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
James Elsey
Ranch Hand

Joined: Dec 21, 2007
Posts: 228

The bottom half is outside of the class, do you mean to put it inside its own method or in a constructor?

Please tell us what you want to do, and we can answer better


Kind Regards, James. OCPJP 1.6 || My SCJP / OCJCP Study Notes
Interested in : SCJP, Google App Engine, Stripes, Android;|| My Bite-Size SCJP Study Blog
Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051


see this should work fine



SCJP6.0,My blog Ranchers from Delhi
Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051

in Java,Everything should be there inside a class.
Class acts like a template that describes the kinds of state and behavior that objects
of its type support
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: array of object
 
Similar Threads
Search Method . Passing values Problem
Using String
sort the String values in String array?
how to compare if object exists in arraylist and add if doesn't
String is in String array or not ?