Posts

Showing posts from April, 2017

How to Create Whole Path Automatically and write into File In Java

        File file = new File("/home/anand/Desktop/filename.html");         file.getParentFile().mkdirs();         FileWriter writer = new FileWriter(file);                 bw = new BufferedWriter(writer);         PrintWriter  out = new PrintWriter(bw);         out.println("<h4>Welcome in Bangalore</h4>");         out.close();