Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- class Keyboard{
- public static String readLine(){
- try {
- BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
- return (in.readLine());
- } catch(Exception e) {
- return ("");
- }
- }
- public static double readDouble(){
- double enter = Double.parseDouble(readLine());
- return (enter);
- }
- public static char readChar(){
- char ch = readLine().charAt(0);
- return (ch);
- }
- public static void writeLine(String value){
- System.out.println(value);
- }
- public static void writeLine(Double value){
- System.out.println(value);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement