How to convert an integer into character using scanner??
Answers
Answered by
0
what are you trying to say .plzz be clear
sharmarahul5278:
How to convert an integer literal into character??
Answered by
0
public class StringToIntEx
{
public static void main (String[] args)
{
String s = "199";
try
{
int number = Integer.parseInt(s.trim());
System.out.println("number = " + number);
}
catch (NumberFormatException nfe)
{
System.out.println("NumberFormatException: " + nfe.getMessage());
}
}
}
Similar questions
Social Sciences,
7 months ago
Science,
7 months ago
Math,
7 months ago
Math,
1 year ago
Chemistry,
1 year ago