I have a standard input that contains lines of text. Each line contains 2 numbers that are separated by a comma. I need to separate the two numbers so that I can use them in another function. I don't know what would be a good way to read each line, separate the numbers and then use them to call function until there are no more lines to be read. I read the documentation regarding InputStreamReader and BufferedReader, however, since I'm relatively new to java they didn't make much sense.
public static void main(String[] args) throws IOException {
InputStreamReader reader = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(reader);
try {
double num1 = Double.parseDouble(in.readLine());
double num2 = Double.parseDouble(in.readLine());
Main.function(num1,num2);
}