Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training

short Java Keyword

The short is a keyword defined in the java programming language.

Ads

short Java Keyword

     

The short is a keyword defined in the java programming language. Keywords are basically reserved words which have specific meaning relevant to a compiler in java programming language likewise the short keyword indicates the following :  

-- short is a Java primitive type.
-- A short type of  variable may store a 16−bit signed integer.
-- there is a wrapper class corresponding to a short primitive type which is known as the Short class. 
-- The Short wrapper class the defines MIN_VALUE and MAX_VALUE constants.
-- These constants represents the range of values for this type compatible with the short class according to the compiler compatability.
-- Please note that all the integer literals in Java programming language are 32−bit integer values unless they are followed by l or L as in 235L,
this
indicates that the value should be interpreted as a long.

Examples to use the Keyword short  to declare variables within a class

public class Class1{
short = 5;
short octalNumber = 0077;

short hexNumber = 0xff;
}

Advertisements

Share on Google+Share on Google+

short Java Keyword

Posted on: November 17, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

Ads
 

Discuss: short Java Keyword  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:1
ismail
February 24, 2012
java

write a brief short note on java

Ads

 

Ads