Ask Question

Assume that you want to create an array containing ten Die objects. Which of the following code segment accomplishes this correctly? A: Die[] dice = new Die[10]; for (int i = 0; i < dice. length; i++) { dice[i] = new Die (); } B: Die[] dice = new Die[10]; Die die = new Die (); for (int i = 0; i < dice. length; i++) { dice[i] = die; }

+5
Answers (1)
  1. 5 July, 22:48
    0
    Answer: A

    To create an array containing 10 die object we have:

    Die[]dice=new die[10]; for (int I=0; i
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Assume that you want to create an array containing ten Die objects. Which of the following code segment accomplishes this correctly? A: ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers