Hello, I am trying to make a multiple choice quiz, with four possible answers using string arrays and am not too sure how to do so. I made classes for the four answers, the question, and I'm unsure of how to display the text on the string arrays in the world, and how to refer to these string arrays when displaying those questions in the strings. Also, how do I make it so that one of the four answers in the answer array are marked as correct, and are counted as so? can someone please help me out? for reference, my array in the world class looks like this:
Thank you for looking at this and I hope you will be able to help me!
1 2 3 4 | public void Questionarray() { String[] questionArray = { "Question 1" , "Question 2" , "Question 3" ,}; } |
1 2 3 4 | public void Answerarray() { String[][] answerArray = {{ "Answer1" , "Answer2" , "Answer3" , "Answer4" ,}}; } |