I have a problem startsWith() !!!!!
Hi,
A piece of my application is like this:
int TarimSayac=0;
int TarimEksiltSayac=0;
for (int j = 0; j < v.size(); j++){
...
String ipc = obj.getIPCID();
if(ipc.startsWith("A01")) TarimSayac++;
elseif(ipc.startsWith("A01N")) TarimEksiltSayac++;
elseif(...) .....
else .....
}
System.out.println("tarim sayac "+TarimSayac);
System.out.println("tarim eksilt sayac "+TarimEksiltSayac);
I think, there is a problem about startsWith in my application.Because the statement System.out.println("tarim sayac "+TarimSayac);
has run correctly, but it hasn't run with the statement System.out.println("tarim eksilt sayac "+TarimEksiltSayac);
In the loop while the value of counter TarimSayac
is increasing, value of counter TarimEksiltSayac
returns allways null.
I have compared the result of my application with database and there must exist value of TarimEksiltSayac
in my application.
I don't understand why my application doesn' t count ipc s that starts with"A01N"
?
I will be very plaesed when I learn my mistakes.
Thank u:))
Message was edited by:
a5x
Message was edited by:
a5x
Message was edited by:
a5x
Message was edited by:
a5x

