How to pick a random item from a list in a text document?

Discussion in 'Plugin Development' started by PureAspiration, Oct 3, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    PureAspiration

    So I want to pick an item from a list in a text file, but I'm not sure how to do that. Could someone please help me?

    Thanks!
     
  2. Offline

    Newdel

    Get all entries from that file and save it -> get a random entry
     
    Kars likes this.
  3. Offline

    PureAspiration

    So how could I code that? Could you give me an example? Thanks
     
  4. Offline

    timtower Administrator Administrator Moderator

    @PureAspiration That is stuff that you can search for.
    First search: "java read file line by line"
    Second search: "java random"
     
Thread Status:
Not open for further replies.

Share This Page