Q:

Issue With "<" and ">" symbols

I am trying to say that if the number in the text box reaches over 10, then the text changes. However, Eclipse doesn't like the > symbol. What am I doing wrong?
if ( v == txtCarsInCarPark){
    txtCarsInCarPark = > 10;
    txtCarsInCarPark.setText("Car park Full");
}

Also, it seems to do the same here. However, this time I am trying to disable a button when the text box reaches under 0. Again, it doesn't like the < symbol.
if ( v == txtCarsInCarPark){
    txtCarsInCarPark = < 0;
    btnCarOut.setEnabled(false);
}

A:

The syntax for an if statement is:
if (x >= 10)
{
     // do something
}

In your case, you first need to convert the string in the text box to integer:
num = Integer.parseInt(txtCarsInCarPark.getText().toString());
if (num >= 10)
    txtCarsInCarPark.setText("Car park Full");

