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
Leto [7]
3 years ago
9

9.6 Code Practice: Question 1

Computers and Technology
1 answer:
worty [1.4K]3 years ago
8 0

Answer:

  1. import java.util.Random;
  2. import java.util.Arrays;
  3. public class Main {
  4.    public static void main(String[] args) {
  5.        int n = 10;
  6.        int [] myArray = new int[n];
  7.        buildArray(myArray, n);
  8.        System.out.println(Arrays.toString(myArray));
  9.    }
  10.    public static void buildArray(int[] arr, int n){
  11.        for(int i=0; i < arr.length; i++){
  12.            Random rand = new Random();
  13.            arr[i] = rand.nextInt(90) +10;
  14.        }
  15.    }
  16. }

Explanation:

Firstly, create a method buildArray that take two inputs, an array and an array size (Line 12). In the method, use random nextInt method to repeatedly generate a two digit random number within a for loop that will loop over array size number of times (Line 13-15). The expression rand.nextInt(90) + 10 will generate digits between 10 - 99.

In the main program, call the build array method by using an array and array size as input arguments (Line 8). At last, print the array after calling the buildArray method (Line 9).

You might be interested in
Hi, I just ate a hot banana that I cooked in the oven.
mrs_skeptik [129]
Banana fish .. pain. all i know is pain.
4 0
4 years ago
Read 2 more answers
Context-based signatures match a pattern of activity based on the other activity around it, such as a port scan. true and false
valina [46]

Answer:

The given statement is "True".

Explanation:

  • Context-based signatures become wired networks on either the incoming packet's information. Documentation included within the IP headers has been used to stimulate a certificate or stamp based on the scenario.
  • The whole category of signatures examines congestion and how much it appears to fit through the other pedestrians which mostly surrounds it.

So that the above is the true answer.

7 0
3 years ago
Where should you endorse a check
yKpoI14uk [10]
This is done by signing your name on the back of the left end of thecheck<span>. </span>You<span> can also limit who can cash it by specifying in your </span>endorsement<span> that it is only to be deposited into your specified account at Provident.</span>
5 0
3 years ago
Read 2 more answers
One main advantage of CD-ROMs is that
Mumz [18]
I believe the answer is a. CDMA rooms can store much more information than DVDS. good luck
7 0
3 years ago
Whereas &lt; is called a relational operator, x &lt; y is called a(n) ________. A) Arithmetic operator B) Relative operator C) R
Westkost [7]

Answer:

The answer is "Option C".

Explanation:

Relational expression are one or more variable and maybe even values, which operators have linked together. It is also known as the process, which is used to calculate the outcome, that is generated by the relational expression. These words are typically designed to answer the questions in boolean values, and other options were not correct, that can be described as follows:

  • In option A, This process is used to perform the mathematical operation, that's why it is not correct.
  • Option B and Option D both is used to compare values, that's why it is not correct.
3 0
4 years ago
Other questions:
  • After earning a learners license what test must be successfully passed to earn an operators license in Florida
    14·1 answer
  • Paying attention to the trends that might impact your future career is called
    15·2 answers
  • What happens to the data in rom when the power is turned off?
    10·1 answer
  • Explain The main distinction between an ap course and a dual enrollment course.
    13·1 answer
  • Which of these is not considered by economists to be a want?
    8·1 answer
  • Consider sending a 2400-byte datagram into a link that has an mtu of 700 bytes. suppose the original datagram is stamped with th
    10·1 answer
  • QUICK! The commands available from a menu change depending upon what you are doing. True False
    10·2 answers
  • What is the purpose of using variables in programming?
    11·1 answer
  • Dgvdsgf cvdzgb fgvsdxchygfdrzvdszfgvsdzxd
    9·1 answer
  • Utility software includes which of the following ? <br> Select all that apply
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!