Convert int to string in JSP

I'm using if statement in JSP but I get error because the if statement include 2 condition the 1st one is string and the second one is integer with using &&
Who is Participating?
mrcoffee365Connect With a Mentor Commented:
If you want to convert an int to a String, the easiest way is:

int myInt = 4;
String intStr = "" + myInt;
why you are comparing an integer to String? If your string is having a number value then you can convert the String to int and compare to int..

coverting a string to intger.

int num = new Integer("yourstring").intValue();
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.