Looking for assistance with a coding issue I'm having : <p>Hello I'm new to android studio and was hoping one of you guys/gals can help me with a reason why my code is making the app crash? The code is for a simple math puzzle where you have to input the right numbers to get an answer.
Code:</p>

<pre><code>import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class Puzzle extends AppCompatActivity {


    //get the info
    EditText input01 = ( EditText ) findViewById ( R.id.input1 );
    EditText input02 = ( EditText ) findViewById ( R.id.input2 );
    EditText input03 = ( EditText ) findViewById ( R.id.input3 );
    EditText input04 = ( EditText ) findViewById ( R.id.input4 );
    EditText input05 = ( EditText ) findViewById ( R.id.input5 );
    EditText input06 = ( EditText ) findViewById ( R.id.input6 );
    EditText input07 = ( EditText ) findViewById ( R.id.input7 );
    EditText input08 = ( EditText ) findViewById ( R.id.input8 );
    EditText input09 = ( EditText ) findViewById ( R.id.input9 );

    //process data 
    int ans01 = Integer.valueOf ( input01.getText().toString() );
    int ans02 = Integer.valueOf ( input02.getText().toString() );
    int ans03 = Integer.valueOf ( input03.getText().toString() );
    int ans04 = Integer.valueOf ( input04.getText().toString() );
    int ans05 = Integer.valueOf ( input05.getText().toString() );
    int ans06 = Integer.valueOf ( input06.getText().toString() );
    int ans07 = Integer.valueOf ( input07.getText().toString() );
    int ans08 = Integer.valueOf ( input08.getText().toString() );
    int ans09 = Integer.valueOf ( input09.getText().toString() );

    //button creater
    Button check = ( Button ) findViewById(R.id.check);
    Button reset = ( Button ) findViewById(R.id.Reset);

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_puzzle);
        // ATTENTION: This was auto-generated to implement the App Indexing API.
        // See https://g.co/AppIndexing/AndroidStudio for more information.






        reset.setOnClickListener(
                new View.OnClickListener() {
                    @Override
                    public void onClick ( View view ) {

                        input01.setText ( "" );
                        input02.setText ( "" );
                        input03.setText ( "" );
                        input04.setText ( "" );
                        input05.setText ( "" );
                        input06.setText ( "" );
                        input07.setText ( "" );
                        input08.setText ( "" );
                        input09.setText ( "" );

                    }
                }
        );
// this is where the code starts crashing the app.
        check.setOnClickListener(
                new View.OnClickListener() {
                    @Override
                    public void onClick(View view) {

                    // I want an if statement that checks the values of the inputed numbers
                     if ( ans01 + ans02 + ans03 = 14) {
                            input01.setTextColor(Color.GREEN);
                            input02.setTextColor(Color.RED);
                      }

                    }enter code here
                }
        );


    }

}
</code></pre>

<p>Any help would be appreciated. </p>
