0

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

Toon Krijthe
  • 51,960
  • 37
  • 141
  • 201
fronthem
  • 3,855
  • 6
  • 31
  • 52

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
  • 43,506
  • 7
  • 88
  • 140