Seems like the contents of the field is nor parseable into a number. Which value does it have? You should catch the exception regardless, as you don't want the app to crash just because someone accidentally typed a non-number.
i dnt knw why it is not parsing here....
iam entering number using getText().toString() ...now iits a string agn if i parse to integer...i think dats why it gives cannot parse and numberformatexception
is there any way to get the number entered as integer and pass directly...
please suggest
If this was my problem I'd write the value that's passed to Integer.parseInt to the logcat output, so that I wouldn't have to guess what's going wrong.
Very, very wrong. Read up on the difference between string equality and object equality. What the "==" does here is exactly the wrong one - don't compare strings using "==".