When I try to read a value and print it its not projecting the same i dont understand what is the mistake i am giving the code which i tried to compile

Code:
import java.io.IOException;

class Toread
    {
	  public static void main(String args[]) 
	      {
		      int x;
	     System.out.println("Enter a digit");
	          try
	          {
		    x= System.in.read();
...