This week's book giveaway is in the Cloud forum.
We're giving away four copies of Terraform in Action and have Scott Winkler on-line!
See this thread for details.
Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Arrays - Array concepts, array of objects, etc. HELP!!!!!

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone tell me how to make arrays and advanced arrays?
Also how to make arrays of objects, comparison of array values, and the arrays class in general?
Have a test tomorrow and am really confused about this. Please help.
Thanks Have a good day!  
 
Bartender
Posts: 1249
87
Hibernate jQuery Spring MySQL Database Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to CodeRanch!
Please go through The Java™ Tutorials. Will you please post the complete code you tried so far with the error (If there is any)?

Here are some links please go through them too, click here --> Ease Up  Show Some Effort Keep It Down

To attract and get help from more volunteers better go through all of them --> How To Ask Questions On Java Ranch  
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello I'm new too and I'd like to share a brief look at the structure of a single dimensional array and a multidimensional array or arrays and advanced arrays as you called them.

A single dimensional array follows a format like this:

dataType[] variableName = new dataType[arraySize]
or
double[] numbers = new double[10];

where the word "double" is the data type and the word "numbers" is the variable name. There is only one set of square brackets, [], because this array is only one dimensional and the word "new" can be thought of as an extra requirement to declare the array.
If you want to read more on single dimensional arrays I'd recommend chapter 7, section 2, in the Java Programming 10th Edition book.

A multi dimensional array follows a format like this:

dataType[][] variableName = [AmountOfRows][AmountOfColumns]
or
int[][] multiNumbers = new int[10][10];

where the word "int" is the data type and the word "multinumbers" is the variable name, same as before. However, there are two sets of square brackets this time, [][], because this array is two dimensional and has rows and columns instead of just one row of variables.
If you want to read more on multi dimensional array I'd recommend you start at chapter 8, section 2, in the Java Programming 10th Edition book, same book as before

Good luck on your programming!
 
reply
    Bookmark Topic Watch Topic
  • New Topic