I am fairly new to Java and I would like to ask how is it possible to get the last line of a text file using Java? For example, the contents of the text file would be something like:
001,abc,abc@yahoo.com,123456,President
002,xxx,xxx@gmail.com,xxx,Member
What I am trying to get is the userID of the users (eg:001). I already know how to read from a text file normally, but what I need is the last line from the text file so that I can give users incrementing IDs.