1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Rudiy27
4 years ago
11

Assume that you want to create an array containing ten Die objects. Which of the following code segment accomplishes this correc

tly? 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; }
Computers and Technology
1 answer:
V125BC [204]4 years ago
8 0

Answer: A

To create an array containing 10 die object we have:

Die[]dice=new die[10]; for (int I=0; i<dice,length; i++){dice[I]=new die();}

You might be interested in
Define and test a function myRange. This function should behave like Python’s standard range function, with the required and opt
Cerrena [4.2K]

Answer:

Study Python’s help on range to determine the names, positions, and what to do with your function’s parameters.

Use a default value of None for the two optional parameters. If these parameters both equal None, then the function has been called with just the stop value. If just the third parameter equals None, then the function has been called with a start value as well. Thus, the first part of the function’s code establishes what the values of the parameters are or should be. The rest of the code uses those values to build a list by counting up or down.

6 0
3 years ago
Read 2 more answers
Suppose we have a 4096 byte byte-addressable memory that is 32-way high-order interleaved, what is the size of the memory addres
iogann1982 [59]

Answer:

7

Explanation:

Given that :

Byte-addressable memory = 4096

Order = 32

Rwqritying such that they have the same base ;

4096 = 2^12

32 = 2^5

2^12 - 2^5

12 - 5 = 7

4 0
3 years ago
Alice is adding a chart in a spreadsheet. Which option will allow her to give the chart a suitable title and subtitle?
jek_recluse [69]
It's D.Chart elements 
6 0
3 years ago
Read 2 more answers
write a function copy(s, n) that takes as inputs a string s and an integer n, and that uses recursion to create and return a str
Yuri [45]

Answer:

Following are the method to the given question:

def copy(s, n):#defining a method copy that takes two parameters

   if n <= 0:#definig if to compare n value is less than equal to 0

       return ''#return space  

   else:#definig else block  

       return s + copy(s, n-1)#use recursive method that return value

print(copy("by",2))#calling method and print value

print(copy("ta",2))#calling method and print value

print(copy("good by ",2))#calling method and print value

Output:

byby

tata

good by good by

Explanation:

In this code, a method "copy" is declared that takes two parameters that are "s and n" inside the method a conditional statement is used which can be defined as follows.

In the if block is used "n" variable that checks n value which is less than equal to 0 if it is true it will return a space value.

In the else block it use the recursive method that returns a value which is a copy of s that is concatenated together.

8 0
3 years ago
Create a button to play the playlist <br><br> Java, netbeans
Pavel [41]
I'm not sure but maybe one of the two websites can help you
.
http://wiki.netbeans.org/MusicAppUsingRESTRemoting

https://mukeshscience.wordpress.com/2014/05/26/adding-audio-to-java/

6 0
4 years ago
Read 2 more answers
Other questions:
  • Jason, Samantha, Ravi, Sheila, and Ankit are preparing for an upcoming marathon. Each day of the week, they run a certain number
    7·1 answer
  • Compare the specialized and statistical functions in excel
    10·1 answer
  • The functions of forums
    15·1 answer
  • The mutating-table error is raised when a trigger attempts to execute a. an INSERT, UPDATE, or DELETE while another user is upda
    10·1 answer
  • What is the answer to in Microsoft Word you can access the blank from the command command from the mini toolbar what is the corr
    10·2 answers
  • In order to restrict editing to a document, a user will go to Review, , Restrict Editing, and will then select what kinds of edi
    12·1 answer
  • Write a function named dice_eval that accepts two parameters representing numeric dice values and returns a string describing th
    14·1 answer
  • Select all correct statements below: Group of answer choices A redundant link's switch port will be blocked by STP until needed.
    6·1 answer
  • Which type of network consists of multiple Windows computers that share information, but no computer on the network serves as an
    15·1 answer
  • True or False: Once you rename a field, the new field name must be used in the rest of the search string.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!