Search:

Type: Posts; User: Tubbly

Search: Search took 0.07 seconds.

  1. Replies
    11
    Views
    1,138

    Re: returning an integer

    it appeared that I had:

    testing = read(array, evenCount);

    int testing = read(array, evenCount);

    which was causing the problem, fixed that now :)

    program is now working as intended!...
  2. Replies
    11
    Views
    1,138

    Re: returning an integer

    okay, I did the first line and it ended up not doing anything, (it would ask me to enter my values then just do nothing after I pressed enter) so I made a new variable called test and did

    int...
  3. Replies
    11
    Views
    1,138

    Re: returning an integer

    I had already done that in lines 19 and 20:

    read(array, evenCount);
    int[] evenArray = new int [evenCount];

    no luck :(
  4. Replies
    11
    Views
    1,138

    Re: returning an integer

    oh I see, turns out the array size isnt being set to the correct size (0) I believe it may be when im returning the even integer in the read method. how would I use this return value to set the array...
  5. Replies
    11
    Views
    1,138

    Re: returning an integer

    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0

    at AllEven.getEven(AllEven.java:79)
    at AllEven.main(AllEven.java:29)
  6. Replies
    11
    Views
    1,138

    returning an integer

    Hey guys,

    I'm trying to create a program that allows the user to enter the size of an array and then enter the contents of each subscript. after doing that, the program will check which entry is...
Results 1 to 6 of 6