Find the character of an ASCII code

The problem

Write a program that receives an ASCII code (an integer between 0 and 127) and displays its character. For example, if the user enters 97, the program displays character a.

Breaking it down

public static void main(String[] args) {

    Scanner input = new Scanner(;
    System.out.print("Enter an ASCII code: ");
    int number = input.nextInt();

    System.out.println("The character for ASCII code " + number + " is "
            + (char) number);


Enter an ASCII code: 69
The character for ASCII code 69 is E