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

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

  1. Offline


    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?

  2. Offline


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


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

    timtower Moderator Moderator

    @PureAspiration That is stuff that you can search for.
    First search: "java read file line by line"
    Second search: "java random"

Share This Page