如何将整数值转换为字符串值

时间:2014-12-29 09:19:44

标签: java

 orderAttributeType.setName(hirTask.getEscalationLevel());

HI,     这里我通过使用这些来获取整数值(hirTask.getEscalationLevel).setname是驱逐sting值。任何人都可以告诉我如何将整数解析为字符串。

2 个答案:

答案 0 :(得分:3)

您可以使用Integer.toString(int)之类的

Integer.toString(hirTask.getEscalationLevel())

String.valueOf(int)

String.valueOf(hirTask.getEscalationLevel())

甚至

"" + hirTask.getEscalationLevel()

答案 1 :(得分:2)

在包装类对象String.valueOf(int)中尝试integer.toString()或整数。

相关问题