3:53 pm - Saturday March 25, 1511

Byte 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 : This program converts the byte value into short value
 */
public class Short {
	
	public static void main(String args[]) {
	
		Byte b = new Byte("-120");
		short c = b.shortValue(); // shorting byte value
		System.out.println(c);
	}
}

Ouput:

-12

BACK

Filed in: Z-A All Java Codes

Comments are closed.