Link to home
Start Free TrialLog in
Avatar of jbaird123
jbaird123

asked on

Java If - then - else logic in one function

Is there a java function that provides "if-then-else" logic?

Example:  In Excel, you can use a function -  if (1=2,"False","True")

Avatar of leakim971
leakim971
Flag of Guadeloupe image

Hello jbaird123,

Of course !

Check this :


boolean result = !(1==2);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of mahome
mahome
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial