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
gavmur [86]
3 years ago
7

Assume that you have an array of integers named arr. Which of these code segments print the same results? int i = 0; while (i &l

t; arr.length) { System.out.println(arr[i]); i++; } int i; for (i = 0; i <= arr.length; i++) { System.out.println(arr[i]); } for (int i : arr) { System.out.println(i); }
Computers and Technology
1 answer:
otez555 [7]3 years ago
6 0

Answer:

2.    int i; for (i = 0; i <= arr.length; i++) { System.out.println(arr[i]); }

3. for (int i : arr) { System.out.println(i); }

second and third code segments print the same output.

Explanation:

In first code segment, while loop starts printing from arr[0] and it continues till the second last element of the the array as in statement of while loop i<arr.length. Which print till arr[length - 1].

In second code, for loop starts from 0 and ends at the last element of the array. which prints from arr[0] to arr[length].

In third code segment, it also print from arr[0] to arr[length]. In this case      for (int i : arr)  means start from first value of array and continues till last element of the array.

You might be interested in
How do you think advances in processors affect corporations that discover the computers they purchased just a couple of years ag
lozanna [386]

Answer:

Increased processor speed and multi core technologies.

Explanation:

The development of processors over the years is overwhelmingly fast. The CPU use to be cumbersome, expensive and computational speed was moderate.

As it evolves, the CPU was minimized to give rise to microprocessors.

Microprocessors are very fast, running millions of processes on its core. The multiple core processors helped to increase the speed of these processors.

When there are more than one core in a processor (dual, quad or octal core), it processes data in parallel reducing the time of execution compared to a one core processor.

A company having computers with single core would need to upgrade to a new computer with multi core processor to promote speed in data processing.

3 0
3 years ago
Sharon is a skilled professional who operates logging equipment.
Viktor [21]
Natural resource systems hope this helps

7 0
3 years ago
Read 2 more answers
Can someone please help with one? I will mark brainlest!!!
Snowcat [4.5K]

I want to say that it is data authenticity?

4 0
3 years ago
Read 2 more answers
. Html documents are created by adding what to text?
zvonat [6]
The answer is Tags, sorry about putting the other answer misread question.
7 0
3 years ago
Please identify three examples of how the United States is heteronormative
juin [17]

Answer:

Well, let's say you're out at a bar. A friend of yours sees a cute guy, but she's hesitant to make the first move because she assumes the guy would be turned off by that - because we're socialized to believe that women shouldn't approach men like that, lest they come off as desperate. That's heteronormativity.

When she finally gets the courage to go up and talk to him, he begins to call her infantilizing pet names (like honey, baby, and sweetheart) - which would be fine if they'd agreed upon it, but he's just assuming she's cool with it! That's heteronormativity.

When she begins to get uncomfortable by these names, she gets up and leaves. But the guy says something like, "Oh, come on! Women are so sensitive. What's your problem?" That's heteronormativity.

5 0
3 years ago
Other questions:
  • The _____ helps the project team to identify the main functions or features of the system and the different users or external sy
    15·1 answer
  • Why are computer messages encapsulated?
    13·1 answer
  • Is the answer a,b,c,d
    8·1 answer
  • What is the Documenter?
    10·1 answer
  • Cuales son los elementos de la programación?
    10·1 answer
  • Create an application named TurningDemo that creates instances of four classes: Page, Corner, Pancake, and Leaf. Create an inter
    7·1 answer
  • Which statement is false? Select one: a. Function printf does not care how large the array it is printing is. b. Function scanf
    9·1 answer
  • Please help me on this coding problem :)
    6·1 answer
  • What's your opinion on Pokemon​ and pixeldip
    5·1 answer
  • What is the core function of an enterprise platform
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!