Daniel Demesmaecker wrote:As you can see... Like the first image... Something went wrong when uploading your images, we can't see them.
If you use img tags you can only use images that are saved online, otherwise you have to add them as an attachement.
Anyways have a look at how to format a string
I am afraid I can see problems with that tutorial; maybe you should add it to your list of tutorials to avoid.
Daniel Demesmaecker wrote:. . . have a look at how to format a string
Joseph Mokenela wrote:Rather explain in words what is your expected outcome and what the program is printing instead of using images.
The images do not show up.
Michael Connolly wrote:. . . The images sums it up much cleaner and easier, surely?
Campbell Ritchie wrote:Please explain what those numbers are supposed to mean.
Dave Tolls wrote:In lines 175-183 you print out all the section headers.
Only then do you loop through your data to print out the tags.
Presumably what you want is to print out a header and then iterate over the array associated with that header, then print the next header, and so on.
Dave Tolls wrote:Looking again at the code above I'm not too sure you are actually splitting up the tags?
I can't tell all that easily.
My first suggestion is to, at the very least, get all that code in switch case you are having issues (3) with out into a seperate method.
Then break that method down into steps, each of which should be a seperate method.
That way you break the problem down into smaller parts.
So, from a quick look, I would have:
getFileName method, which covers 106 to 133 (though I would not open a FileScanner, since that chunk of code doesn't seem to do anything...just test whether the file exists using the Files.exists method).
parseFile method, covering 139 to 173.
displayResults method, covering 175 to 197.
I would write the output method first, since that defines what format you want the data to be in from the method that will parse the file.
I would possibly even break it down more, but the above should help you to focus on one part of the problem at a time.