2:16 am - Tuesday April 23, 2019

Byte Example Program for parseByte(String s,int radix)

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 parses the string argument as a signed value in
 *               radix value
 */
public class parseByteEx {
	
	public static void main(String args[]) {
	
		String s = "25";
		Byte b = Byte.parseByte(s, 8); // parses the signed byte value with
										// radix value
		System.out.println(b);
	}
}

Ouput:
D:CandidJavalangByte>javac parseByteEx.java
D:CandidJavalangByte>java parseByteEx
21

BACK

Filed in: Z-A All Java Codes

Comments are closed.