Java – Short Example

Short is primitive data type in java which can take small numeric value. Short is same like integer data type but it can take small number. Use of short in java is shown below.

Example of short in java

public class ShortExampleJava {

    public static void main(String[] args) {

        short sht=123;

        System.out.println("Short primitive data type :"+sht);
    }
}

Output

Short primitive data type :123

Tags:

Bookmark  

 

One Response to “Java – Short Example”

  1. gnanamani says:

    i need to folder treestrure

Leave a Reply

Security Code:

 

  Random Post