Simple Java Issue
<p>This isn't working the way I expect it to. Sample input will include an asterisk that will resemble ether 0 or 1. The rest is comparing to see if the numbers match up. When I  try to see if a character an asterisk it doesn't work the way I expect it to.</p>

<p>Samples: </p>

<p>org = *01</p>

<p>bit = 001 || 101 || 011</p>

<pre><code>public static void doesItWork(String org, String bit)
    {
        for(int i = 0; i &lt;= org.length() - 1; i++)
        {
            System.out.println(org.substring(i, i + 1));
            if(org.substring(i, i + 1) != "*" &amp;&amp; org.substring(i, i + 1) !=  bit.substring(i, i + 1))
                break;

            if(i == org.length() - 1)
                System.out.println(bit);
        }
    }
</code></pre>

<p>Thanks guys for your help.</p>
