Good Day all!...Could I ask one question about break please...
Why I am getting nothing when I put this break? at least it prints something
if it's true...please refer my codes below:
It works fine if I take out the break statement. But then it will exercise all lines in my inputfile. What I want is, after I got the first output then it will stop checking the next line....please feel free to reply me. thank you.
Why I am getting nothing when I put this break? at least it prints something
if it's true...please refer my codes below:
Code:
if(name2.equals(name1)) {
if(add2.equals(add1)) {
if(!(val2.equals(val1))) {
printWriter.println(fileno + " : " + name2 );
break;
}
}
}
Comment