Results 1 to 2 of 2
  1. #1
    SIVAKUMAR.J is offline Member
    Join Date
    Jul 2010
    Location
    chennai
    Posts
    3
    Rep Power
    0

    Default How to evaluate the mathematical expression from the string in J2ME

    How to evaluate the mathematical expression from the string in J2ME.

    For example a string containing "2*4".From the string i want evaluate the mathematical expression and get the result as 8 (2*4).How should i done this in J2ME.

    In "Java™ Platform Standard Ed. 6 " there is a package namely "javax.script" is used for evaluating mathematical expressions from string.Like that any package or any class is available for J2ME to evaluate the mathematical expression from the string.

  2. #2
    port22 is offline Member
    Join Date
    Nov 2010
    Posts
    7
    Rep Power
    0

    Default

    Can you not just import the library that has the function you're familiar with?

    If not, you could always use regular expressions to map out the equation.

Similar Threads

  1. Create program to evaluate prefix expression
    By Debonairj in forum New To Java
    Replies: 1
    Last Post: 08-12-2010, 03:35 AM
  2. Evaluate a string expression
    By aparna_pall in forum New To Java
    Replies: 2
    Last Post: 04-10-2010, 04:53 AM
  3. Replies: 2
    Last Post: 11-11-2009, 06:56 AM
  4. Help: Mathematical Expressions
    By JohnAtick in forum New To Java
    Replies: 3
    Last Post: 03-09-2009, 07:02 PM
  5. String to Expression? calculator app question
    By Belbis in forum New To Java
    Replies: 2
    Last Post: 12-24-2008, 08:13 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •