To test if two things are equal, for most types: |
Other tests for int and double types: |
To test if two strings have the same value: |
int num; |
if ( num == 0 ) ... value of num is 0 |
( num != 0 ) value of num is not 0 |
( num < 0 ) value of num is less than 0 |
( num <= 0 ) value of num is less than or = 0 |
( num > 0 ) value of num is greater than 0 |
. . . and so on |
String label; |
if ( label.equals ("enter") ) value of label is "enter" |