Campbell Ritchie wrote:You appear to have two independent problems: One is how to read text from a file, which is best done with a FileReader and a BufferedInputStream, which you will have read about in the tutorial.
The other is how to create an object from the data in your file; that depends on the format of the file and all its information being in the correct order and the correct positions.
Campbell Ritchie wrote:I haven’t got a link to it on this computer, but Google for Java Tutorials file input output and you should find something useful This is one of the hits from that Google search.
Campbell Ritchie wrote:Add a line like this to display the input: System.out.printf("Input = \u201c%s\u201d%n", input); where you are calling the String in question input. You will get “” around the output.