I'm having trouble making up code to show a given number of random words from a given text String..
This is what I've been able to do so far. It's supposed to display 4 random words from the String text, but what it does is instead show 4 random numbers going from 0 - text.length(). I feel like I'm almost nearing solution? But I don't know how to change those random numbers into random words from the String instead...
I'd appreciate all suggestions.Code: