package com.codegym.task.task06.task0610;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
ConsoleReader class
*/
public class ConsoleReader {
public static String readString() throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String answer = reader.readLine();
return answer;
}
public static int readInt() throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String answerString = reader.readLine();
int answer = Integer.parseInt(answerString);
return answer;
}
public static double readDouble() throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String answerString = reader.readLine();
double answer = Double.parseDouble(answerString);
return answer;
}
public static boolean readBoolean() throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String answerString = reader.readLine();
boolean answer = Boolean.parseBoolean(answerString);
return answer;
}
public static void main(String[] args) {
}
}
scriptKing
Level 7
I wrote this out but i dont really understand what im doing can someone explain this a bit better to me?
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Gellert Varga
24 September 2021, 08:43
Man could write a whole little novel about how this prog works, depending on how much the person understands and how much he/she don't. Unfortunately, at this moment we don't know yet what you do already understand and exactly which details confuses you.
You could share with us - it will be easier to help.
0