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
Masteriza [31]
4 years ago
8

What would be the results of the following code? int[] array1 = new int[25]; … // Code that will put values in array1 int value

= array1[0]; for (int a = 1; a < array1.length; a++) { if (array1[a] < value) value = array1[a]; }
Computers and Technology
2 answers:
Marina CMI [18]4 years ago
5 0

Answer:

'value' contains the minimum value in the array, array1.

Explanation:

In the code:

int[] array1 = new int[25];

…

// Code that will put values in array1

int value = array1[0];

for (int a = 1; a < array1.length; a++) {

   if (array1[a] < value) value = array1[a];

}

We declare an integer array array1 of size 25.

We initialize the variable 'value' to the first element of the array , array1[0].

Then we iterate through the array to update the value whenever the array element is less than the current 'value'.

So eventually value will contain the minima in the original array.

Elden [556K]4 years ago
3 0

Answer:

value = 0

and every element of array1 is 0.

Explanation:

int[] array1 = new int[25];

Since it is initialized using new keyword.Elements of the array initialized using new are always initialized with 0.So value will become 0 since value of array1[0] is 0 and in the the loop if condition will never gets executed because array1[a] is always 0 that is equal to value.

You might be interested in
Scenario2: Now suppose the LAN must support both voice and data and you must choose one of these multiple access strategies in o
AleksandrR [38]

Answer:

The RTP (real time protocol) which uses the UDP ( user datagram protocol) and Real-time control protocol.

Explanation:

The RTP of a voice over IP protocol (VoIP) which is used to prioritise the transfer of video and audio data over text data. It is used for video conferencing and telephony services in an enterprise.

It uses the user-datagram protocol to transfer or access videos and audio data for its real time effect and the real-time control protocol for quality of service analysis and maintenance.

4 0
3 years ago
help:(What are the uses of various lights? How are they all different? How do you decide on their usage? How can you use natural
Monica [59]

Answer:

This is one of the most common types of lighting. Ambient light is a soft glow that blankets your space just enough for you to function without causing a harsh glare. In photography and cinematography, ambient light is considered the "natural light" within a room. In décor, ambient light is very similar, except you create the ambient light by making the room's lighting as natural and flat as possible. While ambient light is meant to get you safely from point A-to-B, it is not ideal for working closely with things or to highlight things around your space. When used correctly, ambient light creates a fantastic environment to relax from an overly stressful day or to have a warm conversation with an old friend. Ambient lighting is often referred to as mood lighting, because this light captures the soft curves of your face and allows your pupils to dilate slightly (a physical sign of affection). Some yoga studios have even begun using the softer ambient lighting in their classes to help draw stress from the body. This is a smaller more concentrated light. You want task lighting around when you’re working. In fact, some people call it office lighting. Task lighting is meant to help you see when you’re doing projects in which you need a finer light, such as, reading, cooking, writing, sewing and many other things. Task lighting only works well when it is used as a contrasting light. For example, if you have a low lit room with a swing arm lamp turned on over your desk, the light over the desk surface will be more effective with less glare or shadow-effect than if the entire room was lit with a brighter light. Task lighting helps naturally stimulate your brain. The contrasting light allows you to be more alert and concentrated. This will help you see more details as you work, creating higher quality results. This is why many businesses choose to use task lighting in their offices.

Explanation:

5 0
3 years ago
What is a good principle to implement when you find yourself attempting to
Maurinko [17]

its less is more A

to much could make it really bad

5 0
4 years ago
Vadik is creating a program where the user inputs their grade level and the program tells them which sports teams they are allow
Lelechka [254]
He should use if, elif, else
4 0
3 years ago
Read 2 more answers
What kind of java program runs within a java-enabled browser?
ankoles [38]
An applet.





_____________
5 0
3 years ago
Other questions:
  • When doing a complex presentation, which of the following would be the best tool to begin designing your presentation?
    11·2 answers
  • A TCP entity opens a connection and uses slow start. Approximately how many round-trip times are required before TCP can send N
    11·1 answer
  • Which tab in the Tasks view is used to modify the Current View?
    11·2 answers
  • _is a computer network created for an individual person
    10·1 answer
  • Your job is to write a basic blurring algorithm for a video driver. The algorithm will do the following: it will go through all
    11·1 answer
  • True or False: <br> The object reference can be used to polymorphically store any class in Java.
    13·1 answer
  • How do the companies gather data to determine common passwords?
    13·1 answer
  • Write a program that will ask the user for three different numerical values. The program should then decide whether the values a
    13·1 answer
  • What is a graph,a chart then give similarities between graph and chart.​
    6·2 answers
  • A company is looking to share data between two platforms in order to extend their functionality. which feature enables communica
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!