Java short type

In this chapter you will learn:

  1. What is Java short type
  2. Size and value for Java short type
  3. Example - Java short type

Description

The size of Java short type is between byte and integer.

Size and value

short is a signed 16-bit type. short type variable has a range from -32,768 to 32,767.

Example

Here are some examples of short variable declarations:


short s; 
short t;

Next chapter...

What you will learn in the next chapter:

  1. Java int type introduction
  2. Size and value for Java int type
  3. What is octal integer and how to use it in Java
  4. What is hexadecimal integer and how to use it in Java
Home »
  Java Tutorial »
    Java Langauge »
      Java Data Types
Java Primitive Data Types
Java boolean type
Java char type
Java char value escape
Java byte type
Java short type
Java int type
Java long type
Java float type
Java double type
Java String type
Java String Escape
Java String Concatenation