How to Create a Short Type in Java


In this example, we will learn the method to create a short type in Java.

Source Code

package com.beginner.examples;
short type
public class ShortType {
  public static void main(String[] args) {
    short num = 100; // short
    System.out.println(num);
  }
}

Output:

100
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments