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]
2 years ago
9

9.6 Code Practice: Question 1

Computers and Technology
1 answer:
worty [1.4K]2 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
List four reasons of meaningful use that demonstrate the capabilities and processes required for the provider to show active use
Naily [24]

<span>1.       </span>Improve quality of care and reduce health disparities.

<span>2.       </span>Read the orders in the medical record and make sure to read it back again to verify accuracy.

<span>3.       </span>Maintain the security and privacy of patient health information.

<span>4.       </span>Talk to the patients and families in management of their health care.






7 0
3 years ago
If you wanted a computer to store a variable with the content of “110 Maple Street,” which data type would be most appropriate?
hichkok12 [17]

Answer:

string

Explanation:

string holds words while boolean only returns true or false and both binary and float  hold numbers

8 0
3 years ago
Read 2 more answers
The language C was originally developed by​
nataly862011 [7]

Answer:

Dennis Ritchie

C was originally developed at Bell Labs by Dennis Ritchie between 1972 and 1973 to make utilities running on Unix

3 0
3 years ago
Read 2 more answers
• The technical support department at your company has informed you that you will be receiving a new computer within the next we
alexdok [17]
1) back up your data
2) delete any personal information
3) clear cookies, browsing data, and saved passwords
4) restore any settings you may have changed to original settings
6 0
2 years ago
Cybersecurity breaches in the workplace generally happen because _____. Select 3 options. people deliberately try to hack into t
Lady_Fox [76]

Cybersecurity breaches in the workplace generally happen because:

  • People deliberately try to hack into the network people.
  • People make unintentional mistakes.
  • People do not know about cybersecurity protocols

<h3>What are the three main causes of security breaches?</h3>

The major reasons for data breaches are:

  • Old, Unpatched Security Vulnerabilities.
  • Human Error
  • Malware, etc.

Therefore, Cybersecurity breaches in the workplace generally happen because:

  • People deliberately try to hack into the network people.
  • People make unintentional mistakes.
  • People do not know about cybersecurity protocols

Learn more about Cybersecurity from

brainly.com/question/12010892

#SPJ1

5 0
2 years ago
Other questions:
  • What characteristics need to be exhibited by an organisation to improve its software process?
    7·1 answer
  • Objective:This assignment is designed to give you experience with thinking about algorithm analysis and performanceevaluation.Pr
    11·1 answer
  • A strategy to solve a logic problem is to break it into steps. Using the drop-down menu, complete these sentences about solving
    15·2 answers
  • IT professionals have a responsibility to educate employees about the risks of hot spots. Which of the following are risks assoc
    13·1 answer
  • Where are the worksheet tabs located
    7·1 answer
  • Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te
    13·1 answer
  • Czy FALL GUYS będzie działało szybko na i5 GH8? Na ilu FPS?
    13·1 answer
  • What does NOT match with Agile Manifesto?
    9·1 answer
  • 4. In computers, an integer can be represented by more than 8-bit, what is the largest positive integer that
    9·1 answer
  • assuming the default gateway is connected to the internet, what type of internet access would this server have?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!