3:53 pm - Sunday March 25, 1027

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 shortValueEx {
	
	public static void main(String args[]) {
	
		Byte b = new Byte("-120");
		short c = b.shortValue(); // shorting byte value
		System.out.println(c);
	}
}

Ouput:
D:CandidJavalangByte>javac shortValueEx.java
D:CandidJavalangByte>java shortValueEx
-120

BACK

Filed in: Z-A All Java Codes

Comments are closed.