1
0

Add chapters 18-20 for the java book

This commit is contained in:
2025-12-04 12:14:38 +01:00
parent 2da137aea8
commit 5eded28b16
43 changed files with 1925 additions and 2 deletions

View File

@@ -0,0 +1,32 @@
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.ArrayList;
public class Eingabe extends Thread {
private Personal personal;
public Eingabe(Personal personal) {
this.personal = personal;
}
@Override
public void run() {
boolean weiter = true;
while (weiter) {
synchronized(this.personal) {
try {
var inputStream = new InputStreamReader(System.in);
var bufferedReader = new BufferedReader(inputStream);
this.personal.eingabe();
System.out.println("Weitere Berechnung durchführen (j/n)?");
weiter = bufferedReader.readLine().equals("j");
} catch (IOException exception) {
}
}
}
}
}