public void saveParking (String fileName)throws FileNotFoundException { //ESTATICO? File fichero = new File(fileName); int numMaxZone = 0; int temp = 0; int temp_int = 0; int numero = 0; if (fichero.exists() == true) { PrintWriter pw = new PrintWriter(fichero); temp = (int)maxZone; temp_int = 64; numMaxZone = temp - temp_int; numero = sizeZone + 1; pw.println(numMaxZone + numero); //ESCRIBO EN EL FICHERO LAS DIMENSIONES for (int i=0; i<numMaxZone; i++) { for (int j=0; j<numero; j++) { pw.println(carSpaces[i][j].toText()); } } }else{ PrintWriter pw2 = new PrintWriter(fichero); temp = (int)maxZone; temp_int = 64; numMaxZone = temp - temp_int; numero = sizeZone + 1; pw2.println(numMaxZone + numero); //ESCRIBO EN EL FICHERO LAS DIMENSIONES for (int i=0; i<numMaxZone; i++) { for (int j=0; j<numero; j++) { pw2.println(carSpaces[i][j].toText()); } } } }
new P3b().saveParking(args[2]);
public class Parking { }
Parking.class
java,class.path
-classpath
java
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)