# import java.io.IOExcep tion;
#
# class Toread
# {
# public static void main(String args[])
# {
# int x;
# System.out.prin tln("Enter a digit");
# try
# {
# x= System.in.read( );
# System.out.prin tln("Entered Value:"+x);
# }
# catch(IOExcepti on e)
# {
# System.out.prin tln("You had entred wrong value");
# }
# }
#
# }
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
When i try to compile the output is this way
Enter a digit: 1
Entered Value :50
#
# class Toread
# {
# public static void main(String args[])
# {
# int x;
# System.out.prin tln("Enter a digit");
# try
# {
# x= System.in.read( );
# System.out.prin tln("Entered Value:"+x);
# }
# catch(IOExcepti on e)
# {
# System.out.prin tln("You had entred wrong value");
# }
# }
#
# }
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
When i try to compile the output is this way
Enter a digit: 1
Entered Value :50
Comment