Error on java indexOf in android : <p>in a block of my java code for an android project I'm trying to get position of a character in a string but application closes unexpectedly.</p>

<p>java code :</p>

<pre><code>   public void onClickGet(View v){
    String getInput = editText.getText().toString();
    if(getInput.contains("(") ) {
        //inputEx(getInput);
        int a = getInput.indexOf("(");
        Toast.makeText(getApplicationContext(),a,Toast.LENGTH_LONG).show();
    }
</code></pre>
