0

Arrays use

how can I use arrays in a storytelling game?

19th Feb 2019, 8:24 AM
Hawk
Hawk - avatar
1 Antwort
0
Create an array containing paragraphs of the story Then use a loop printing each story with the help of thread.sleep method var stories = {/*an array containing stories*/} for(var story:stories) { System.out.println(story); Thread.sleep(1000); } According to my memory sleep method will throw an InterruptedException. So make sure to catch it
19th Feb 2019, 8:50 AM
Seniru
Seniru - avatar