0

I have "+" and I want to use it as "if(1 + 2 == 3)"

Toon Krijthe
  • 52,876
  • 38
  • 145
  • 202
fronthem
  • 4,011
  • 8
  • 34
  • 55

1 Answers1

2

If you want to evaluate "1+2" as a mathematical equation: Evaluating a math expression given in string form

If you want to evaluate if(1+2==3) as an if statement, java should do that for you.

Community
  • 1
  • 1
Jeffrey
  • 44,417
  • 8
  • 90
  • 141