Guest User

Untitled

a guest
Nov 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. public static void main(String[] args) {
  2. int inChar;
  3. System.out.println("Enter a Character:");
  4. try {
  5. inChar = System.in.read();
  6. System.out.print("You entered ");
  7. System.out.println(inChar);
  8. }
  9. catch (IOException e){
  10. System.out.println("Error reading from user");
  11. }
  12. }
Add Comment
Please, Sign In to add comment