What is the “less than or equal to” operator in Java?
•
Java
I am familiar with ActionScript programming. I often use "< =" (less than or equal to) or "> =" (greater than or equal to) operators
But in eclipse, I have been unable to use these operators This is my situation Define variables:
final EditText UserNumber = (EditText) findViewById(R.id.editText1);
This is for:
if (UserNumber <= 10){ }
I'm sure this is a very simple / quick fix, but I'm not sure what to use in this case
This is my mistake:
Solution
You cannot compare an EditText instance with a number because the error explicitly indicates it
You may want to get the value of EditText
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码