programming-examples/java/Core_Java/Detect ASCII values.java
2019-11-15 12:59:38 +01:00

14 lines
343 B
Java

Detect ASCII values
BufferedReader inStream=new BufferedReader(new InputStreamReader(System.in));
int a;
for(int i=1;i<=26;i++)
{
System.out.println("please enter a character: ");
a=(int)System.in.read();
System.out.println("The integer code for " +(char)a+ " is " +(int)a);
inStream.readLine();
}