Here you can find the source of writeLines(Path path, T... a)
@SafeVarargs public static <T extends CharSequence> void writeLines(Path path, T... a) throws IOException
//package com.java2s; //License from project: Apache License import java.io.*; import java.nio.charset.*; import java.nio.file.*; import java.util.*; public class Main { @SafeVarargs public static <T extends CharSequence> void writeLines(Path path, T... a) throws IOException { Files.write(path, Arrays.asList(a), StandardCharsets.UTF_8); }/* w w w .ja v a 2 s .com*/ }