Java program String char into Ascii and Generate multiplication tables.
String char to ASCII value Conversion The program read s string from user and converts each of the character from string into ascii value using for loop statement and byte type casting. On beginning of the program execution, a string input read from user to convert into ascii char by char. import java.util.Scanner; public class String2Ascii { public static void main(String[] args) { System.out.println( "string char to Ascii value n" ); Scanner sc = new Scanner(System.in); System.out.println( "Enter a string" ); String str =sc.nextLine(); sc.close(); System.out.println( "\n char \t Ascii" ); for ( int n=0;n<str.length() ; n++ ) { char c = str.charAt(n); System.out.println(c + " -t" + ( byte )c); } } } Output string char to Ascii value Enter a string hello world char - Ascii h - 104 e - 101 l - 108 l - 108 o - 111 ...