2:25 am - Friday April 19, 2019

Integer Example Program for shortValue()

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/**
*@author :candidjava.com
*@descriptions : First Check with Short datatype range,
*/
public class ShortValueExample
{
    public static void main(String[] args)
    {
      Integer a=35000;
        Integer d = new Integer(35000); //Creating  object and argument value passed

        System.out.println("The short value is: "+ d.shortValue()); //called Shortvalue method and compare to short value range
    }
}

Output:
D:Candidjavalanginteger>javac ShortValueExample.java
D:Candidjavalanginteger> java ShortValueExample
Shortvalue is :-30536

BACK

Filed in: Z-A All Java Codes

Comments are closed.