programming-examples/java/Core_Java/Detect ASCII values.java

14 lines
343 B
Java
Raw Normal View History

2019-11-15 12:59:38 +01:00
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();
}