Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
public void save(File file) {
try {
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
for (int i = 0; i < arr.length; i++) {
for (int j = 0; j < arr[i].length; j++) {
writer.write(arr[i][j] + ";"); //mit Komma getrennte Werte
}
}
writer.close();
}
catch (IOException e) {
e.printStackTrace();
}
public void save(File file) {
try {
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
for (int i = 0; i < arr.length; i++) {
for (int j = 0; j < arr[i].length; j++) {
writer.write(arr[i][j] + ";"); //mit Komma getrennte Werte
}
writer.newLine(); // <-----------------
}
writer.close();
}
catch (IOException e) {
e.printStackTrace();
}
public String[][] read(File file) {
List<String[]> list = new ArrayList<String[]>();
try {
BufferedReader read = new BufferedReader(new FileReader(file));
String in = read.readLine();
while (in != null) {
String[] line = in.split(";");
list.add(line);
in = read.readLine();
}
} catch (Exception e) {
e.printStackTrace();
}
String[][] tmp = new String[list.size()][];
return list.toArray(tmp);
}
static void einlesen(File datei) {
try {
BufferedWriter writer = new BufferedWriter(new FileWriter(datei));
for (int i = 0; i < 13; i++) {
for (int j = 0; j < 13; j++) {
writer.write(feld[i][j] + ";"); //mit Komma getrennte Werte
}
writer.newLine(); // <-----------------
}
writer.close();
}
catch (IOException e) {
e.printStackTrace();
}
}