Search:

Type: Posts; User: JaAnTr

Search: Search took 0.11 seconds.

  1. Replies
    12
    Views
    1,241

    Re: Adding operands and operators to Arrays.

    I think I've finally figured it out, but I'm not completely sure. I think I've got both the operands and operators in arrays, but as I've used different ways to get them in to the arrays I'm not sure...
  2. Replies
    12
    Views
    1,241

    Re: Adding operands and operators to Arrays.

    Ok, i've read what you said and realised that you can't print an ArrayList like that. I've also read about printing an arrayList using a for loop and I've tried that but it's still printing...
  3. Replies
    12
    Views
    1,241

    Re: Adding operands and operators to Arrays.

    Sorry I'm not sure I understand you when you say it needs to be an array not an arrayList? Surely it's better to use an ArrayList as I don't have to define how big it is?

    Here is my code incase...
  4. Replies
    12
    Views
    1,241

    Re: Adding operands and operators to Arrays.

    When I'm trying to print using that I'm getting the error "The method toString(long[]) in the type Arrays is not applicable for the arguments (ArrayList<String[]>)"

    Eclipse is suggesting I change...
  5. Replies
    12
    Views
    1,241

    Re: Adding operands and operators to Arrays.

    I've spent some time researching how to do it and I've come up with something but I've got a few issues. Here's the code:




    public static Object[] parseInput(String stringCalculator)
    {...
  6. Replies
    12
    Views
    1,241

    Re: Adding operands and operators to Arrays.

    Sorry, I'm not sure exactly what you mean. I've already got the input split in to an array so what I really want to do is take all the characters that are +-/* from the array and put them in the...
  7. Replies
    12
    Views
    1,241

    Adding operands and operators to Arrays.

    Hi, I'm building a calculator and I need to take input from the user, and put the operators and operands in separate arrays. So far I have managed to split the input up by using operators and regex....
Results 1 to 7 of 7