Search:

Type: Posts; User: ajw1993

Search: Search took 0.09 seconds.

  1. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    testMarks[add][columns + i] = ( scanner2.nextInt(); ) < what would go there to make it not null
  2. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    is that part one > for(int add=0; add<responces; add++)
    {
    for (int columns =0; columns<10; columns ++){

    testMarks[add][columns] = ...
  3. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    how would i just change the end of the line and store the ints that have been converted ?
  4. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    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
  5. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    thats what i want it to do , so what do i need to do in that method to ensure that works ??
  6. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    i have to change the strings into ints via the switch statement i dont wana store the strings themselves
  7. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    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...
  8. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    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...
  9. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    so how do i the other two , cz of the commas n etc they are the problem
  10. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    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...
  11. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    testMarks[add][columns + num] = scanner.nextInt(); - still null , but prints out the first line of the file
  12. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    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("[ ]*(,)[...
  13. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    when does the delimiter come into use because i need to use it
  14. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    public void readMarksData(String fileName)throws FileNotFoundException
    {
    File dataFile = new File (fileName);
    Scanner scanner = new Scanner(dataFile);

    ...
  15. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    there is no out from it
  16. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    1803
  17. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    it keeps coming out blank because of the switch statement parameter so it isnt printing anything
  18. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    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
  19. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    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
  20. Re: Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    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
    {
  21. Im having trouble storing ints that have been converted at the end of a line in a file into a 2d array.

    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...
Results 1 to 21 of 22