Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Infix calculator problem

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Infix calculator problem[SOLVED]

    Hello everyone I am new here on the forums so first of all hi to everyone .
    I am making a infix calculator and the only problem that i am having is handling the parenthesis . The expression without parenthesis is solved correctly but when it comes to an expression with parenthesis i get exception.

    PROBLEM SOLVED , THANKS FOR THE REPLIES
    Last edited by cubertron; December 3rd, 2011 at 05:16 AM.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Infix calculator problem

    i get exception
    Please post the full text of the error message.

  3. #3
    Junior Member
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Infix calculator problem

    This is the exception message
    Exception in thread "main" java.lang.NullPointerException
    at d8.apply(d8.java:178)
    at d8.eVal(d8.java:146)
    at d8.main(d8.java:241)

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Infix calculator problem

    The error message says the code is trying to use a variable with a null value at line 178.
    Look at line 178, see which variable is null and backtrack in the code to find out why that variable does not have a valid value and change the code so it gets a valid value.

Similar Threads

  1. Carpet Calculator Problem using aggregation
    By gpelefty90 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 1st, 2011, 02:31 PM
  2. Calculator layout problem
    By Choiseymitsu in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 28th, 2011, 08:04 AM
  3. [SOLVED] Another Calculator Problem
    By The_Mexican in forum What's Wrong With My Code?
    Replies: 0
    Last Post: December 4th, 2010, 03:31 PM
  4. Calculator problem
    By The_Mexican in forum What's Wrong With My Code?
    Replies: 10
    Last Post: December 4th, 2010, 01:01 PM
  5. Infix to Prefix
    By Sasarai in forum Algorithms & Recursion
    Replies: 2
    Last Post: November 7th, 2009, 10:03 PM