Bookmark Topic Watch Topic
  • New Topic

send the formula expression from another place  RSS feed

 
Muhammad Shamsher Khan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hello Everybody!

I hope that all you will be fine. My Question is with reference of java.

I want to make formula syntax in another place and it will go in backend process and execute. for example:

public static void main(String args[])
{
try
{
int myResult = myFormula("(a * b)/c");
System.out.println(myResult);

}

}

public int myFormul(String Str_Variable)
{
int a = 32, b = 20, c = 2,result = 0;
try
{

result = Str_Variable;
return result;

}
}


How is it possible in java? please write any example for it.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Report post to moderator
There is now an answer in the duplicate thread here, so this thread should be closed.
[ January 26, 2006: Message edited by: Ulf Dittmer ]
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!