Help with Arrays

Joined
May 12, 2010
Messages
1
Reaction score
0
I'm a college student and have an assignment where I have to create String and Float arrays for provided test date.

I believe I understand that I have to declare it in my declarations:
String TransTypeArray[]; //The TransType Array
String TransDateArray[]; //The Transaction Date Array
float TransAmtArray[]; //The Transaction Amount Array
float RunBalArray[]; //The Running Balance Array

Then I created it in my main:

TransTypeArray = new String[8];
TransDateArray = new String[7];
TransAmtArray = new float[7];
RunBalArray = new float[7];


What I'm not clear on is how to initilize it.
I'm assuming what happens is when I enter in the data as an input it stores it?

I don't get how to make that happen here:

System.out.print("Input TransType: ");
TransType = stdin.readLine();


Am I reading the assignment wrong???

The transType, transDate and transAmt arrays should be initialized within the Java source code to store the Project #5 Test Data. The currBal array values should be assigned as those values are calculated during the execution of the program.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top