|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi,
im studying computer science at university and im about to start researching my final year project. My problem is dimensional arrays. My project involves a bilogical key so in my array i will have a question and if they answer yes it goes to the relevant index under yes or if they answer no they go to the relevant array index listed under no. e.g array questions = 0 _ _ _ _ _ _ _ _ _ _ 1 2 3 0| Was the bird black? 1| 2 2| 3 So if they answer yes then the next question to be displayed will be the question stored in array index 2 or if they answer no the question at index 3 will be displayed. The problem i have is loading data from a text file into this multi dimensional array. Im going to have a text file say called questions.txt containing this information: questions.txt Was the bird black? 2 3 Was the bird in a tree? 6 7 There will be more than 1 question in each file. So my question is how do i load this information from the txt file into the array. Once i can get this working then i can feel confident i can continue my project. Thanks for reading my problem Andrew |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > mulit-dimensional arrays in java |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|