Search:

Type: Posts; User: incxx

Search: Search took 0.19 seconds.

  1. Replies
    4
    Views
    1,268

    Re: java.lang.ArrayIndexOutOfBoundsException error

    I understand why that was happening now! Thank you so much for your explanation, it helped a lot. I have applied your corrections and it works perfectly. Thanks!
  2. Replies
    4
    Views
    1,268

    Re: java.lang.ArrayIndexOutOfBoundsException error

    This is what is on that line:

    while (newArray[j][mydimension] > pivot[mydimension]) {
    j--;
    }

    I believe my problem may be when I add 1 to the dimensions in the constructors,...
  3. Replies
    4
    Views
    1,268

    java.lang.ArrayIndexOutOfBoundsException error

    I have an object and client class created which prints coordinates in order of their distance from the origin. The client class asks the user how many dimensions they want the array to have (x,y or...
  4. Replies
    5
    Views
    859

    Re: Array and Objects trouble

    So would i call the fillArray() before I send "dimension" and "points" into setArray() by adding this,



    objects.fillArray(objects.getArray(), objects.getRange(), objects.getDimension(),...
  5. Replies
    5
    Views
    859

    Re: Array and Objects trouble

    I have made changes based on your answer. When ran, it will print the number of points the user asked for, however it only prints zeros. Is there an error happening when I set the array to the values...
  6. Replies
    5
    Views
    859

    Array and Objects trouble

    I'm trying to set the method "setArray()" with the values of "dimension" and "points" entered by a user. When I try to print it by calling the "getArray()" method, it prints "[[D@6818c458". Why is...
  7. Replies
    2
    Views
    1,006

    Program with objects and classes trouble

    I am making a two player game. Each player gets to roll the dice three times each, where they can keep numbers that they roll each roll. If they keep one number from the first roll, they can continue...
  8. Replies
    4
    Views
    1,487

    Re: Creating methods with Arrays

    I've change it and called it herre:


    for (int i = 0; i < points; i++){
    fileOut.println(writeTofile(coordinate[i]));
    }
    fileOut.close();//writes to file
    ...
  9. Replies
    4
    Views
    1,487

    Creating methods with Arrays

    I'm trying to make my program write to a file using two methods. It compiles with no errors, but when the file that it wrote to is opened, only coordinates with (0,0) are printed. Its supposed to...
  10. Replies
    2
    Views
    1,065

    Java Program String Arrays Problem

    The program allows the user to enter a phrase, and the program is supposed to print the phrase using ROT13 , which replaces each english letter with the letter 13 places forward, using arrays to...
  11. Re: Program trying to calculate money, won't work

    I went through the code, added some thing and fixed most of the problem. However when I enter certain amounts, such as numbers ending with 3 (e.x 85.23) it gives me the wrong amount of change. Do you...
  12. Program trying to calculate money, won't work

    My program is supposed to ask the user to enter a dollar value from up to 100 dollars, and output the amount of bills and coins required to create that amount with the least change possible. I'm not...
Results 1 to 12 of 12