Skip to Content
0
Former Member
Feb 12, 2007 at 12:03 PM

Java :Checking for Not equal to

257 Views

Hi Group,

In Java How to Check the Condition for not equals to

When I am using the following code I am not getting expected result:


String str1 = new String();
String str2 = new String();
String str3 = new String();
String str4 = new String();

for (int i =0; i<a.length; i++)
{
str1=a<i>.substring(0,6);
str2=a<i>.substring(7,14); 
str3=a<i>.substring(18,23); 
str4=a<i>.substring(24,31); 
if ( (!str1.equals("000000")) || (!str2.equals("00000000")) || (!str3.equals("000000")) ||
    (!str4.equals("00000000")))
 
result.addValue("");

}