Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-14-2007, 12:05 AM
Member
 
Join Date: Jul 2007
Posts: 44
susan is on a distinguished road
Help with matrix
I'm doing a program in my Java class that I just need a tad bit of help with, I need to get the matrix arrays to get the data the right way...currently my program (without the print function)

Code:
import javax.swing.*; public class matrixArray { public static void main( String args[] ) { int testScores[][] = new int[ 3 ][ 3 ]; fillScores( testScores ); System.exit( 0 ); } public static void fillScores( int[][] ftestScores ) { for( int row = 0; row < ftestScores.length; row++ ) { for( int column = 0; column < ftestScores[ row ].length; column++ ) // I'm using Input dialog boxes to retrieve the data from the user and I'm wondering how I will put the data into the arrays } } }
Thanks
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-07-2007, 06:37 AM
Member
 
Join Date: Jul 2007
Posts: 40
cachi is on a distinguished road
As for your problem well you already have var row. Since this is an assignment I won't give you the exact answer.
Just think about the indexes of the array cells. What could you use to access each cell? Remember array indexes start at 0.

Greetings.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with dox matrix printer Albert Advanced Java 1 07-13-2007 05:23 PM


All times are GMT +3. The time now is 11:13 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org