abyinsydney
Programmer
greetings fellow citizen
Does any one has an idea about the following
i have a string like 000000-314.14
i need to read the string in java as soon as i encounter a non zero value it should return me the position of the counter.for instance while reading the string as soon as the cursor encounters - it should tell me the postion off -
idea being a non zero value cause another string can have the value to be 00000123.314.
Means as soon as i encounter a non zero value should let me know the position of the cursor
1. String z2 !="0";
2. int ya=g.lastIndexOf(z2);
3. System.out.println("value for ya is " +ya);
I'm getting an error on line 1.How do i initialise the value of z2 to be not equal to O
Can any one suggest me a problem to the same
Or if any one has some other solution
regards
aby
Does any one has an idea about the following
i have a string like 000000-314.14
i need to read the string in java as soon as i encounter a non zero value it should return me the position of the counter.for instance while reading the string as soon as the cursor encounters - it should tell me the postion off -
idea being a non zero value cause another string can have the value to be 00000123.314.
Means as soon as i encounter a non zero value should let me know the position of the cursor
1. String z2 !="0";
2. int ya=g.lastIndexOf(z2);
3. System.out.println("value for ya is " +ya);
I'm getting an error on line 1.How do i initialise the value of z2 to be not equal to O
Can any one suggest me a problem to the same
Or if any one has some other solution
regards
aby