| Return | Method | Summary |
|---|---|---|
| String | toString() | Returns a String object representing this Short's value. |
| static String | toString(short s) | Returns a new String object representing the specified short. |
public class Main {
public static void main(String[] args) {
Short shortValue = new Short("10");
System.out.println(shortValue.toString());
System.out.println(Short.toString((short)10));
}
}
The output:
10
10java2s.com | | Contact Us | Privacy Policy |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |