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.
Samples:
org = *01
bit = 001 || 101 || 011
public static void doesItWork(String org, String bit)
{
for(int i = 0; i <= org.length() - 1; i++)
{
System.out.println(org.substring(i, i + 1));
if(org.substring(i, i + 1) != "*" && org.substring(i, i + 1) != bit.substring(i, i + 1))
break;
if(i == org.length() - 1)
System.out.println(bit);
}
}
Thanks guys for your help.