Java Data Type Tutorial - 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{

   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.