I started learning the Java language about 10 days ago, reading Introduction to Programming Using Java by David J. Eck.  I've made it halfway through chapter six in about 9 days. I realized I was going way too fast to learn efficiently, and so I'm going back to reread the focal points of the chapters and finish the exercises in more detail. I've written out a program that allows the user to choose to read or write to a file, whether it be existent or new. They also may choose to write to a file specified by a name, or chosen from the file tree via window (I did not code that part; I believe it is in the TextIO class). The reading class allows the user to read from the last file, or one specified from the file tree via window (see above).Question:   What are some ways to reformat the code for a more proper semantic approach, or for better flow of program? I'm concerned with how often Eclipse complained about referring to a static in a non-static field, and so (nearly?) everything had to be declared public static. Also, what might be some good ways to extend a program like this - assuming my minimal experience with the language - and also provide a good learning curve/challenge?Link to GitHub repositorypublic class Filer {final static int read = 1;final static int write = 2;public static void main(String[] args) {    pl(********************************************************);    pl(Welcome, and thank you for using Text File);    pl(Manager, Version 0.0 . );    pl();    pl(********************************************************);    pl(This software was created by Phil Carpenter at);    pl(Tempest Design Studios &copy; 2015);    pl(This program allows you to read and write to);    pl(files using a few different methods.);    pl();    pl(********************************************************);    pl(You may either choose to either write to a file, or);    pl(read from an existing file.);    pl(You may also either name a file, or choose one from the file);    pl(tree screen.);    pl();    pl(********************************************************);    pl();    p(Would you like to run the program?:   );    boolean running = TextIO.getlnBoolean();    while(running){        pl(Would you like to read the contents of an existing file [1], or);        p(rather write to a file [2]?:     );        int choice = TextIO.getlnInt();        while(choice != read && choice != write){                   pl(********************************************************);            p(Please choose a valid option [1 or 2]:    );            choice = TextIO.getlnInt();        } // end while(choice) //        if(choice == read) {            FileRead.Reader();        } else if (choice == write) {            FileWrite.Writer();        } else; // end if(choice) //        p(Run program again?:         );        running = TextIO.getlnBoolean();    } // end while(running) //    pl(********************************************************);    pl(////////////////////////////////////////////////////////);    pl();    pl();    pl(Thank you for choosing Tempest's Software! We hope it suited);    pl(your needs completely.);    pl();    pl();    pl(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\);    pl(********************************************************);        System.exit(0);    }    public static void pl(String x) {        TextIO.putln(x);    } // end pl() //    public static void p(String y) {        TextIO.put(y);    } // end p() //    public static void pf(String z) {        TextIO.putf(z);    } // end pf() //}FileReadpublic class FileRead {    public static void Reader() {        TextIO.putln(********************************************************);        TextIO.putln(********************************************************);        TextIO.putln(You are now using VeryBasic File Reader v.0,);        TextIO.putln(created by TDS/2015.);        TextIO.putln();        TextIO.putln();        TextIO.putln(********************************************************);        TextIO.putln(Would you like to read from the last file in this);        TextIO.put(session [1], or choose a file from the tree [2]?     );        int choice = TextIO.getInt();        if (choice == 1){            ReadLast();        } else {            ReadUser();        } // end if(choice) //    } // end Reader() //    public static void ReadUser() {         TextIO.putln(********************************************************);        TextIO.putln(Would you like to begin reading a file of);        TextIO.put(your choosing?:     );        boolean reading = TextIO.getBoolean();        while (reading) {            TextIO.putln();            TextIO.putln();            TextIO.readUserSelectedFile();            String y = TextIO.getln();            TextIO.writeStandardOutput();            TextIO.putln(********************************************************);            TextIO.putln(Here is the data from the file you've);            TextIO.putln(requested:    );            TextIO.putln();            TextIO.putln(********************************************************);            TextIO.putln(////////////////////////////////////////////////////////);            TextIO.putln();            TextIO.putln();            TextIO.putln(y);            TextIO.putln();            TextIO.putln();            TextIO.putln(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\);            TextIO.putln(********************************************************);            TextIO.readStandardInput();            TextIO.put(Read from another file?:     );            reading = TextIO.getBoolean();        } // end while(reading) //    } // end ReadUser() //    public static void ReadLast() {        TextIO.putln(********************************************************);        TextIO.putln(You are now using VeryBasic File Reader v.0);        TextIO.putln(created by TDS/2015);        TextIO.putln();        TextIO.putln();        String file = new String();        String contents = new String();        TextIO.putln(********************************************************);        TextIO.putln(Would you like to begin reading from the last);        TextIO.put(file written to in this session?     );        boolean reading = TextIO.getBoolean();        while(reading) {            TextIO.putln();            TextIO.putln();            file = FileWrite.lastfile;            TextIO.putln(********************************************************);            TextIO.putln(Here are the contents of the last file);            TextIO.putln(you worked on this session, if any.);            TextIO.putln();            TextIO.readFile(file);            contents = TextIO.getln();            TextIO.writeStandardOutput();            TextIO.putln(********************************************************);            TextIO.putln(////////////////////////////////////////////////////////);            TextIO.putln(contents);            TextIO.putln(\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\);            TextIO.putln(********************************************************);            TextIO.readStandardInput();            TextIO.putln();            TextIO.put(Would you like to print it again?    );            reading = TextIO.getBoolean();        } // end while(reading) //    } // end ReadLast() //}FileWritepublic class FileWrite {    public static void Writer() {        pl(********************************************************);        pl(********************************************************);        pl(You are now using VeryBasic File Writer v.0,);        pl(created by TDS/2015.);        pl();        pl();        pl(********************************************************);        pl(Note that when writing to a file:);        pl();        pl(If the file does not exist, it will be);        pl(created and written to.);        pl();        pl(Existing files will be replaced, or);        pl(\overwritten\...);        pl();        pl(All writing will be copied as written;);        pl(whitespace and symbols included.);        pl(********************************************************);        pl();        pl(Would you like to specify a file name [1],);        p(or choose a file from the tree [2]?     );        int choice = TextIO.getInt();        if (choice == 1){            WriteFile();        } else {            WriteUser();        } // end if(choice) //    } // end Writer() //    public static String lastfile = new String();    public static void WriteUser() {        boolean writing;        do {            pl(********************************************************);            pl(Begin writing content to fill file.);            pl();            pl(Return a line with a single SPACE or);             pl(\\\n\ to represent line breaks in your);            pl(writing procedure.);            pl();            pl(Return an EMPTY line when finished writing,);            pl(and you will be then prompted to select a file);            pl(to save your writing to.);            pl(********************************************************);            String input = TextIO.getln();            String value = new String();            do {                if (input.equals( ) || input.equals(\\n)) {                    value += \\n + \\n;                } else {                    value += input +  ;                } // end if/else //                input = TextIO.getln();            } while(!(input.equals())); // end do/while(input) //            pl(********************************************************);            pl(Please choose a file to write/rewrite.);            pl();            pl();            TextIO.writeUserSelectedFile();            lastfile = TextIO.getOutputFileName();            pl(value);            TextIO.writeStandardOutput();            pl();            pl(********************************************************);            pl(Would you like to write to another file?);            writing = TextIO.getlnBoolean();                } while(writing);// end do/while(writing) //    } // end WriteUser() //    public static void WriteFile() {        boolean writing;        do{            pl(********************************************************);            pl(Begin writing content to fill file.);            pl();            pl(Return a line with a single SPACE or);             pl(\\\n\ to represent line breaks in your);            pl(writing procedure.);            pl();            pl(Return an EMPTY line when finished writing,);            pl(and you will be then prompted to select a file);            pl(to save your writing to.);            pl(********************************************************);            String input = TextIO.getln();            String value = new String();            do {                if (input.equals( ) || input.equals(\\n)) {                    value += \\n + \\n;                } else {                    value += input +  ;                } // end if/else //                input = TextIO.getln();            } while(!(input.equals())); // end do/while(input) //            pl(********************************************************);            String filename = new String();            p(Please specify a file name:      );            filename = TextIO.getln();            TextIO.writeFile(filename);            lastfile = TextIO.getOutputFileName();            pl(value);            TextIO.writeStandardOutput();            pl();            pl(********************************************************);            p(Would you like to write to another file?   );            writing = TextIO.getlnBoolean();        } while(writing); // end do/while(writing) //    } // end WriteFile() //    public static void pl(String x) {        TextIO.putln(x);    } // end pl() //    public static void p(String y) {        TextIO.put(y);    } // end p() //    public static void pf(String z) {        TextIO.putf(z);    } // end pf() //} // end FileWrite //
Very basic Java file reader/writer
java;beginner;file;io