3:50 pm - Friday February 19, 7492

Character Example Program for getNumericValue(char ch)

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
// Example program for getNumericValue('ch')
/**
 * @author :candidjava.com
 * @description:Returns the int value for the given character represents.
 */
public class Getnumeric1 {
	public static void main(String[] args) {
		char c = 'A';// initialize the char for to find numeric value.
		int i = Character.getNumericValue(c);
	// getNumericValue(c)function is used to find numeric value of given  char.

		System.out.print("The Numeric value of A is= " + i);
	}
}

Output:
The Numeric value of A is=10

Filed in: Z-A All Java Codes

Comments are closed.