2:21 am - Friday April 19, 2019

Integer Example Program for parseInt(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 : Assign the value in declared string variable. this string
 *               value passing as parseInt method after integer radix value
 *               passing this method.This method convert String to integer
 */
public class ParseIntEx {
	
	public static void main(String args[]){
int c=Integer.parseInt("9789788",24);//parseInt(String s,int radix)
System.out.println(?INTEGER VALUE IS:?+c);
}
}

Output:
D:Candidjavalanginteger>javac ParseIntEx .java
D:Candidjavalanginteger> java ParseIntEx
INTEGER VALUE IS:1778448008

BACK

Filed in: Z-A All Java Codes

Comments are closed.