/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package coins; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; /** * * @author inj Ivan */ public class _sol { public static void main(String[] args) throws IOException{ // TODO code application logic here List lines = new ArrayList<>(); String line = "4"; lines.add(line); Files.write(Paths.get("coins.out"), lines, StandardCharsets.UTF_8); } }