Java Data Type Tutorial - Java Short.longValue()








Syntax

Short.longValue() has the following syntax.

public long longValue()

Example

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: