Sunday, 18 December 2022

File System Develop a program and write it to files by using Formatter class IN JVA

 

FILE SYSTEM IN JAVA 


import java.util.*;
public class file {
        public static void main(String args[]) {
            try {
                Formatter f = new Formatter("a.txt");
                f.format("avinash");
                f.format("rathod");
                f.close();
   
            } catch (Exception e) {
                System.out.println("Error");
            }
        }
    }
 

OUTPUT: avinashrathod


No comments:

Post a Comment

GitHub Most Imp Command For Every Developer Learn:

 Top Command for GitHub:  1) git clone 2) git init and git status   3) git add file name  or git add .  4) git commit -m message  5) git rem...