File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Arrays

 
Mwenya Chongo
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you know how to declare an array inside a method?
 
Colm Dickson
Ranch Hand
Posts: 89
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic