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
Firdavs [7]
2 years ago
12

I have to write this in Java, but i've never even learned it before and i'm completely lost

Computers and Technology
1 answer:
Varvara68 [4.7K]2 years ago
7 0

Answer:

private void printArray(int[] arr){   //0

  System.out.print("[");   //1

  for(int k : arr){   //2

     System.out.print(k + ", ");   //3

  }

  System.out.println("]");   //4

}

Explanation:

This method should get you started. Your teacher may want a different format or a different type of loop. If you haven't learned for loops yet don't use them that'd be suspicious ;)

What I did:

0: This is the method heading with one parameter for the 1D array. If you need to access it in a different class change private to public.

1: This prints the [ with no line break

2: This is an enhanced for loop to iterate through each element in a 1D array. Alternatively, a normal for loop looks like this:

for (int i = 0; i < arr.length; i++)

instead of retrieving the variable with the enhanced for, you'd have to use arr[i] instead of k in this scenario.

3: This prints the value in each pass of the loop along with a comma and a space.

4: This adds the ] with a line break when the loop is completed

Hope this helps you get started :D comment if you need further help

You might be interested in
Which option in the file menu will open a blank document?
artcher [175]

The answer is click on new

5 0
3 years ago
A biologic reaction is produced by 4 Gyt of a test radiation. It takes 16 Gyt of 250-kVp x-rays to produce the same biologic rea
Shalnov [3]

Answer:

4

Explanation:

Relative Biological Effectiveness (RBE) =

Standard Radiation dose / Test Radiation dose

for achieving the same biological effect.

The absorbed radiation dose is measured in units of Gyt(Gray in tissue).

In the given scenario, Standard radiation dose of 250 KVp X-rays = 16 Gyt

Corresponding Test Radiation dose = 4 Gyt

Therefore, Relative Biological Effectiveness = 16/4 = 4

7 0
3 years ago
A web designer is creating a web site and wants each browser to resize the text size to look the same in each device. what measu
adelina 88 [10]
The designer could use the measurements in pixels. 
4 0
3 years ago
QUESTION: Which is not an example of a video port or cable?
Vikki [24]

Answer:

Radio Corporation of America (RCA)

Explanation:

A corporation is not a video connector.

8 0
3 years ago
Windows workstations all have elements of server software built-in. What are these elements, and why is the Windows Professional
lions [1.4K]

Answer:

The answer is below

Explanation:

Elements of Server software that is built-in, in Windows workstations are:

1. Hard drives,

2. RAM (Random Access Memory)

3. Processors

4. Network adapters.

Windows Professional OS is not considered a server due to the following:

1. Windows Professional OS has a limit on the number of client connections it allowed.

2. Unlike Server, Professional OS uses less memory

2. In comparison to Server, Professional OS uses the CPU less efficiently

4. Professional OS is not built to process background tasks, unlike Server that is configured to perform background tasks.

6 0
3 years ago
Other questions:
  • You just read an msds for acetic acid. based on what you read, what type of information is included in an msds sheet? record you
    7·1 answer
  • 20 points/ When creating a storyboard, in which section do you mention how you move from one shot to the next?
    11·1 answer
  • What is the first step in the exchange between a web browser and a database?
    7·1 answer
  • You have been asked to delete some data from medisoft but find that there is no delete button. what is another method you can us
    10·1 answer
  • A company uses the account code 669 for maintenance expense. However, one of the company's clerks often codes maintenance expens
    15·1 answer
  • Which of the following is not an advanced strategy you may use to help you conduct a search on the Internet?
    12·1 answer
  • Give an example of a situation in which a compromise of Confidentiality leads to compromise in Integrity.Situation where confide
    8·1 answer
  • Do you get notified if someone follows you on Spotify like your email or do you just have to find out on your own
    14·1 answer
  • High level languages are closer to machine language than humans yes or no​
    12·2 answers
  • If a document is stored on a file server but team members can edit the document​ anonymously, the content on the file server is:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!