testMarks[add][columns + i] = ( scanner2.nextInt(); ) < what would go there to make it not null
Type: Posts; User: ajw1993
testMarks[add][columns + i] = ( scanner2.nextInt(); ) < what would go there to make it not null
is that part one > for(int add=0; add<responces; add++)
{
for (int columns =0; columns<10; columns ++){
testMarks[add][columns] = ...
how would i just change the end of the line and store the ints that have been converted ?
its just in the for loops the start of the method is what i want so thats find its what happens in the for loops thats the problem
thats what i want it to do , so what do i need to do in that method to ensure that works ??
i have to change the strings into ints via the switch statement i dont wana store the strings themselves
yeah i have to read in the line in the array testMarks[add][the line of ints and converted ints]
- in the add bit is the line that it is in as it is being stored
if u know what i mean , but they...
2. i need to read in all the ints on the lines in the file and store them in the 2d array (8 lines) (10 ints)(4 strings)
3. i need to change the strings at the end of the line and store them in the...
so how do i the other two , cz of the commas n etc they are the problem
i do need to use the delimiter tho to suit the file above tho
1. need to use the delimiter
2. i need to read in all the ints on the lines in the file and store them in the 2d array
3. i need to...
testMarks[add][columns + num] = scanner.nextInt(); - still null , but prints out the first line of the file
could u show me what u mean kinda making it confusing ive only just started in sept thats why im having trouble
Scanner scanner2 = new Scanner(scanner.nextLine());
scanner2.useDelimiter("[ ]*(,)[...
when does the delimiter come into use because i need to use it
public void readMarksData(String fileName)throws FileNotFoundException
{
File dataFile = new File (fileName);
Scanner scanner = new Scanner(dataFile);
...
it keeps coming out blank because of the switch statement parameter so it isnt printing anything
its printing out the changed ints that works fine so its changing , but i dont know what to do now ive posted all my code in the file
ive tried everything i could just post all the code from the class n ive put the print statements in nothing is happening its still the switch statement
its in the for area that is more or less the problem
you can see in the posted image 1801
public void readMarksData(String fileName)throws FileNotFoundException
{
Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.
Can Anyone Help me ??
the problems is i dont know how to store it
its keeping coming...