First char of String, use as a condition... (Java, Android)
<p>So I want to check if the First character of a String is a "!". This works great, but if I use it as a condition it's wrong everytime. Look at my example:</p>

<pre><code>next.setOnClickListener(new View.OnClickListener() {
    public void onClick(View view) {
            EditText num = (EditText) findViewById(R.id.number);
            String text = num.getText().toString();

            int len = text.length();

            String help = text;

            String first = String.valueOf(help.charAt(0));

            if (len == 7 &amp;&amp; first == "!") {
                int value = text;
                //...
            } else {
                int value2 = text;
            }

        }
    });
</code></pre>

<p>Thanks...</p>
