Return | Method | Summary |
---|---|---|
static String | valueOf(boolean b) | Returns the string representation of the boolean argument. |
static String | valueOf(char c) | Returns the string representation of the char argument. |
static String | valueOf(char[] data) | Returns the string representation of the char array argument. |
static String | valueOf(char[] data, int offset, int count) | Returns the string representation of a specific subarray of the char array argument. |
static String | valueOf(double d) | Returns the string representation of the double argument. |
static String | valueOf(float f) | Returns the string representation of the float argument. |
static String | valueOf(int i) | Returns the string representation of the int argument. |
static String | valueOf(long l) | Returns the string representation of the long argument. |
static String | valueOf(Object obj) | Returns the string representation of the Object argument. |
public class Main {
public static void main(String[] argv) {
String str = String.valueOf(123);
System.out.println(str);
}
}
The output:
123
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |