-
-
Save uncoded-ro/9dcfdfd60376412bca663c5825ed61e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ro.virtualcampus.read; | |
import java.io.IOException; | |
public class ReadIn { | |
public static void main(String args[]) { | |
char c; | |
System.out.print("introduceti un caracter: "); | |
try { | |
c = (char) System.in.read(); | |
System.out.println("ati introdus caracterul " + c); | |
System.out.println("cod ASCII caracter " + (int) c); | |
} catch (IOException e) { | |
System.out.println("eroare citire"); | |
e.printStackTrace(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment