Short.longValue() has the following syntax.
public long longValue()
In the following code shows how to use Short.longValue() method.
public class Main { public static void main(String[] args) { Short shortObject = new Short("10"); long l = shortObject.longValue(); System.out.println("long:"+l); } }
The output: