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
1. Bluetooth
Elza [17]

Complete Question:

1. A wireless technology standard for exchanging data over short distances

2. A particular brand of mobile phone/PDA

3. A network that operates over a limited distance, usually for one or a few users

1. Bluetooth

2. PAN

3. Blackberry

Answer:

1. Bluetooth 2. Blackberry . 3. PAN

Explanation:

1. Bluetooth is a wireless technology standard, used in order to exchange data between mobile devices, like smartphones, tablets, headsets, wearables, over short distances in a one-to-one fashion (which means that it is not possible to build a network based in Bluetooth).

2. Blackberry is a brand of mobile phones/PDAs, very popular a decade ago, because it was the first one to allow mobile users to access e-mails and messages from anywhere, at any time.

3. PAN (Personal Area Network) is an ad-hoc network that it is only available for data exchange at a very short distance, within the reach of a person, i.e. a few meters as a maximum.

It is thought to allow someone to interact with his nearest environment (laptop, tablet, PDA) and it can be wireless (like Bluetooth) or wired (via USB cables).

4 0
3 years ago
1. How are computers helpful
d1i1m1o1n [39]

Answer:

Brainliest

Explanation:

It’s hard to imagine banks without technology. In fact, computers have been in use in banking since the 1950s, when Bank of America introduced a computer designed specifically for processing checks. Each new decade has brought innovations that change the way banks manage daily operations and serve customers. Today, you may not even leave your house to do your banking. As much as technology has changed the use of the computer in the banking sector, banks continue to adjust the way they do things.

8 0
3 years ago
Insurance can help you:a. minimize monthly expenses
KIM [24]
This is an easy answer sure in the back of your mind u knew it was b good luck :).

4 0
3 years ago
The undo function allows the user to cancel up to _____ previous typing actions.
GalinKa [24]
C 20 previous typing actions
4 0
3 years ago
The ________ is responsible for the Internet's domain name system and the allocation of IP addresses. ICANN W3C ISOC IAB
Maurinko [17]

Answer:

ICANN

Explanation:

It handles the installation and processing of various databases related to network domains and provides a consistent and secure networking service and there are incorrect options are described as follows:

  • IAB, which provides a protocol for managing IETF, is therefore incorrect.
  • W3C is used in web development.
  • ISOC is used to provide Internet access.
7 0
3 years ago
Other questions:
  • Which of the following is an example of a direct payment subsidy?
    12·1 answer
  • If a hypothesis is strongly supported by the scientific community based on compelling experiment results, it becomes a————
    10·2 answers
  • Okay I need help. In the first picture, the black glasses, that was my vision last year 52:17 135 and my vision now is 52:15 135
    5·1 answer
  • Mary is entering her senior year of college. She has a meeting on Friday with her advisor to discuss her career plans.Mary is al
    15·1 answer
  • Lydia noticed that she feels tired and out of breath after walking her dog up a hill in the park. Which area of fitness does she
    8·1 answer
  • How do you record yourself on a macbook pro
    9·1 answer
  • Using an outline, how do you maintain your computer or cellphone​
    8·1 answer
  • The data source in the document which has the information common to all documents. True or false 
    9·2 answers
  • Which two keys are commonly used to move or insert data?.
    12·1 answer
  • Both IT professionals and governments must apply ethical principles to certify that emerging technologies are to society.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!