Convert Short to short in Java
Description
The following code shows how to convert Short to short.
Example
/* w w w . j av a2 s. c o m*/
public class Main {
public static void main(String[] args) {
short s = -1800;
Short s2 = new Short(s);
System.out.println(s2.shortValue());
}
}
The code above generates the following result.
Home »
Java Tutorial »
Java Data Type »
Java Tutorial »
Java Data Type »