Given the following declaration: char c = A; What is the simplest way to convert the character

Question:

Given the following declaration: char c = ‘A’; What is the simplest way to convert the character value in c to an int? Select the one correct answer.

(a) int i = c;

(b) int i = (int) c;

(c) int i = Character.getNumericValue(c);

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: