Solved

Convert int to string in JSP

Posted on 2009-04-05
2
2,025 Views
Last Modified: 2012-05-06
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 &&
0
Comment
Question by:bworld
2 Comments
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 24071661
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();
0
 
LVL 26

Accepted Solution

by:
mrcoffee365 earned 500 total points
ID: 24072429
If you want to convert an int to a String, the easiest way is:

int myInt = 4;
String intStr = "" + myInt;
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
A procedure for exporting installed hotfix details of remote computers using powershell
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now