Search:

Type: Posts; User: alexd

Search: Search took 0.15 seconds.

  1. Replies
    25
    Views
    3,635

    Re: problem with calculator

    i tried to compiled it again and now it says provided class name is invalid.how did this happen?are online compilers trustworthy?
  2. Replies
    25
    Views
    3,635

    Re: problem with calculator

    scanner class is more preferable.no need for joptionpane
    as for the string it will be something like something like
    system.out.println("give numbers");
    String input = scan.nextLine();...
  3. Replies
    25
    Views
    3,635

    Re: problem with calculator

    yes now i have another question if you don t mind!i have a code for an infix post fix and evaluation as a calculator
    here is the code.it compiles its ok

    // Stack for numbers: 'values'
    ...
  4. Replies
    25
    Views
    3,635

    Re: problem with calculator

    ah yeah i understand what u meant!thanx!sorry but i m really dizzy and english is not my main language!
  5. Replies
    25
    Views
    3,635

    Re: problem with calculator

    i added these at the start
    import java.util.StringTokenizer;
    import java.util.Stack;
    forgot to paste them.now it compiles
  6. Replies
    25
    Views
    3,635

    Re: problem with calculator

    i copied paste it wrong from my wordpad!sorry but i m very tired i ve trying this thing for hours.now i think i pasted right!
  7. Replies
    25
    Views
    3,635

    Re: problem with calculator

    ok guys so i changed the code and i compiled and didn t find any mistakes.but when i run it it shows me this ( i try to run it in an online compiler site )
    Compiling the source code....
    $javac...
  8. Replies
    25
    Views
    3,635

    Re: problem with calculator

    yeah my bad i did it right this time and it shows me
    constructor Arithmetic in class stackscalc.Arithmetic cannot be applied to given types;
    required: java.lang.String
    found: no arguments
    ...
  9. Replies
    25
    Views
    3,635

    Re: problem with calculator

    i added this part
    public static void main (String[] args)
    {
    Arithemtic calculator = new Arithmetic();
    calculator.isBalance();
    }
    but it says class, interface, or enum expected...
  10. Replies
    25
    Views
    3,635

    Re: problem with calculator

    yes guys i m sorry you are right.i have a class and our instructor after like 30-40 hours of java wanted us to make a calculator using 2 stacks and i struggle to make it.i m newbie to java.he doesn t...
  11. Replies
    25
    Views
    3,635

    Re: problem with calculator

    oh sorry its just that i have to give this assignment in 10 days and i m kinda nervous!i fixed though thank you!
    any suggestions guys?it gives me error and i don t know what i did wrong
  12. Replies
    25
    Views
    3,635

    problem with calculator

    hey guys i got a problem with this program.I m supposed to make a calculator using stacks but it seems that i m stack. i can t get the right recognition for () and {} []
    any tips?
    its not necessary...
Results 1 to 12 of 12