0

If I want to convert a int to string and my code is

   database.setMinConnectionsPerPartition
   (dbPoolElement.getAttribute("ConPoolminConnections"));

Am I right in using (String.valueOf to convert it from int to string?

3
  • Solved :) Need to use integer.parsint Commented Sep 4, 2014 at 10:36
  • You need to provide code for me to comment :) Commented Sep 4, 2014 at 10:37
  • Thanks for offer of help! Commented Sep 4, 2014 at 10:40

2 Answers 2

2
String.valueOf(number)

Integer.toString(number)

those are two I can think of now, that will return String value of int

Sign up to request clarification or add additional context in comments.

Comments

0

you could also do it implicitly

String s = myInt+"";

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.