Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help me work with Arrays?

 
mike bones
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
int val[][] = {{80,60,100,90,50},
{69,76,30,100,65},
{75,60,86,50,97}};

Hello. I am trying to figure a method on how to discover the amount of numbers below 50, and the amount of numbers above 50 in this array. I am unfamilar with arrays and how to work with them in Java. I was curious if anyone could assist?

Thanks
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this tutorial about accessing arrays :
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arrays.html
Try to loop through the array using what you've learned from this tutorial, and come back if you're still having troubles
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by mike bones:
...I am unfamilar with arrays and how to work with them in Java...

Also see this thread.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic