Search:

Type: Posts; User: amgleason83

Search: Search took 0.07 seconds.

  1. Re: how to sort array by object string member value?

    I have figured it out....

    apparently, the problem was with the looping statement that used variable b and what stock[b] was pointing to. I changed the statement to say this...

    ...
  2. Re: how to sort array by object string member value?

    yes, i printed...

    stock[a].getItemName()
    stock[a].itemname
    stock[b].getItemName()
    stock[b.itemname
    temp.getItemName()
    temp.itemname
    compare
  3. Re: how to sort array by object string member value?

    I have printed the values stored in stock[a], stock[b], temp, and compare just to make sure that everything was returning a value, not only did they all return a value, but the correct value as well....
  4. Re: how to sort array by object string member value?

    ok, I changed it up a bit trying to get this right. I am still getting the null value error message though. Please help me understand how I should go about printing those values in the correct spot...
  5. Re: how to sort array by object string member value?

    Ok, so I added this for loop at the beginning of the final else statement to display the output. It should compare the strings from each entry in the array. However, I am getting an error message...
  6. how to sort array by object string member value?

    I am trying to sort the 'stock' array (which is made up of Product objects) by the item name of each Product object. Before I start hacking at my code (which works well right now), I want to know if...
  7. Replies
    1
    Views
    1,274

    sentinal not working

    can anyone tell me why the "stop" command does not work?

    package payroll;

    import java.util.Scanner;

    public class Payroll { ...
  8. Need help with simple repetition statement

    I cannot seem to understand why after the first round of input, the loop continues before the name variable is entered the second time. After the loops completes once, I get this output:

    Enter...
  9. Thread: Hello

    by amgleason83
    Replies
    1
    Views
    870

    Hello

    I am glad to finally have some help! lol
Results 1 to 9 of 9