Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

value not passing to the while loop  RSS feed

 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,
I'm doing a project in JSP. In this I'm passinga value string value status which is equal to 0 and later will convert that to a integer value x. When i put the condition if(x==0) then it is not printing the function.

Please help me to sort out this problem..



Please help me..

Thanks in advance

regards

Aravind Prasad
 
Pankaj Patel
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your code is wrong.

You first tell me is it possible to convert String Variable to Integer.

You had compared your status variable to "all".
Now as for example what if your status value is "all".
It will come to Integer.parse("all") and will generate exception.

You can check it using
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!