aspose file tools*
The moose likes Beginning Java and the fly likes Arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Arrays" Watch "Arrays" New topic
Author

Arrays

Mwenya Chongo
Greenhorn

Joined: Dec 15, 2010
Posts: 10
Hi. am new at Java and am just teaching myself. I hope through the forums I will able to gather as much help and advise. To day I want top know how to declare an array in a class outside the main method. And how to declare the array in the constructor.

I hope am not being too... "£$%%^^&**((). This will be my starting point.

Thank you very much
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31077
    
233

Do you know how to declare an array inside a method?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Colm Dickson
Ranch Hand

Joined: Apr 04, 2009
Posts: 89
The folowing is a good link. Arrays can be declares with a certain size and the you can explicitly assign values to each element or you can declare and assign values in one go using the curly braces as can be seen in the following link


http://download.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Arrays