Hi, i've gotta problem with it. i tried to use BufferedReader and then StringTokenizer, and than use a loop that will run random times, but it didn't work how i expected. I want to read whole file and print out couple of randomly chosen words :\
i've just started programming in java, and feel a bit lost in all this, sorry if it's a silly question
Before that, i tried with streamtokenizer, it compiles and runs but the words chosen by programm are really strange, like: "In and honour you here here peace honour In " and so on, some words are chosen lots of times.
In and honour you here here peace honour In
so, code looks like that:
[ February 26, 2008: Message edited by: Karol Klonowski ]
i've just started programming in java, and feel a bit lost in all this, sorry if it's a silly question
Before that, i tried with streamtokenizer, it compiles and runs but the words chosen by programm are really strange, like: "In and honour you here here peace honour In " and so on, some words are chosen lots of times.
In and honour you here here peace honour In
so, code looks like that:
[ February 26, 2008: Message edited by: Karol Klonowski ]