Java Short.toString(short s)

Syntax

Short.toString(short s) has the following syntax.

public static String toString(short s)

Example

In the following code shows how to use Short.toString(short s) method.


public class Main{
//from   ww  w.  j  a  v  a 2s . c  o m
   public static void main(String[] args) {
     short sval = 50;   
     
     System.out.println("Value of specified short is = " + 
         Short.toString((short)sval));
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable