Java Short(short value) Constructor

Syntax

Short(short value) constructor from Short has the following syntax.

public Short(short value)

Example

In the following code shows how to use Short.Short(short value) constructor.


public class Main {
  public static void main(String[] args) {
    short s = 101;
    Short shortObject2 = new Short(s);
    System.out.println(shortObject2);//from   w w  w  .  ja v a2 s  .co  m
  }
}

The output:





















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