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
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);
Step by Step Solution
3.37 Rating (163 Votes )
There are 3 Steps involved in it
A value of type char ca... View full answer
Get step-by-step solutions from verified subject matter experts
