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
Nimfa-mama [501]
3 years ago
14

If there is an int/integer in a array, and the same int/integer comes at the same spot, does it cancel each other out or does it

reassing the value? (Java)
Computers and Technology
1 answer:
joja [24]3 years ago
7 0

Answer:

The answer to this question is given below in the explanation section.

Explanation:

When you use an array in the program, it occupies the memory where to store the data. However, it is noted that the other array cannot store the variable value where the first array has to store its variable value.

however, when you reassign the value their index position of the array, the values are reassigned. But it also depends on the CPU, because sometimes when you release the memory from the array, maybe some other programs get to occupy that location where the first array values were stored.

However, In Java, it is possible that the same int/integer comes at the same spot of the existing integer in an array, then the value at that particular index is reassigned.

You might be interested in
This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by
andreyandreev [35.5K]

Answer:

Follows are the modified code to this question:

#include <stdio.h>//defining a herader file

int main(void) //defining a main method

{

  int arrowBaseHeight = 0,arrowBaseWidth = 0,arrowHeadWidth = 0 ;//defining integer variable

  int i, j; //defining integer variable

  printf("Enter arrow base height:");//print message  

  scanf("%d", &arrowBaseHeight);//input value in arrowBaseHeight variable

  printf("Enter arrow base width:");//print message

  scanf("%d", &arrowBaseWidth);//input value  in arrowBaseWidth variable

  while (arrowHeadWidth <= arrowBaseWidth)//defining while loop to check arrowHeadWidth less then equal to arrowBaseWidth  

  {

      printf("Enter arrow head width:");//print message

      scanf("%d", &arrowHeadWidth);//input value in arrowHeadWidth variable

      printf("\n");//use for line spacing

  }

  // defining for loop for print vertical line of asterisk

  for (i = 0; i < arrowBaseHeight; i++)//defining for loop for print row  

  {

      for (j = 0; j < arrowBaseWidth; j++) //defining for loop for print column

      {

          printf("*");//print asterisk value

      }

      printf("\n");//use for line spacing

  }

//defining for loop for print reverse triangle

  for (i = arrowHeadWidth; i > 0; i--) //defining loop for input length  

  {

      for (j = i; j > 0; j--) //defining loop for triangle  

      {

          printf("*"); //print asterisk value

      }

      printf("\n");//use for line spacing

  }

  return 0;

}

Output:

please find attach file.

Explanation:

In the code, inside the method five integer variable "arrowBaseHeight, arrowBaseWidth, arrowHeadWidth, i, and j" is defined, in which the first three variables are used for input value from the user end, and "i and j" are used in the loop.

In the next step while loop is used for input the value, but in this code, mainly two for loop is used which can be defined as follows:

  • In the first loop, it is used the "arrowBaseHeight and arrowBaseWidth" variable to print the vertical line of the asterisk.
  • In the second loop, it uses the "arrowHeadWidth" variable to print the reverse triangle.

6 0
3 years ago
Which are examples of embedded systems? Choose two answers.
SVEN [57.7K]

Answer:

An operating system inside a virtual machine

Smart TVs

Explanation:

We can explain an embedded systems like a system within other system, in this case we have two examples, the smart TV have an operative system in some cases an Android system, and this system is within the television system, the virtual machine is the same concept, we can have an Android system running in a windows system.

7 0
3 years ago
How do you begin typing a table cell
german

Answer:

Place the insertion point at the beginning of the paragraph in the first cell, press the left arrow key, and begin typing. For vertical tables, place the insertion point at the beginning of the paragraph in the first cell, press the Up Arrow key, and begin typing.

Explanation:

thats how u start

4 0
3 years ago
Fallon is a new student on campus. Everywhere she goes, she is asked for her 12-digit student number. To memorize her new studen
makvit [3.9K]

Answer:

chunking

Explanation:

Chunking refers to an approach for making more efficient use of short-term memory by grouping information. Chunking breaks up long strings of information into units or chunks. The resulting chunks are easier to commit to memory than a longer uninterrupted string of information.

8 0
3 years ago
A device that allows multiple computers to communicate with each other is
Lapatulllka [165]

Answer:

A device that allows multiple computers to communicate with each other is

Network Hub.

Hope this helps!

:)

4 0
3 years ago
Other questions:
  • A common chart type used to show the contributions of items to a whole is a _____ chart.
    6·1 answer
  • The next four octal numbers after 36 is:________.
    10·1 answer
  • What vi command do you use to insert the a file named "file2.txt" to the end of your current file?
    12·1 answer
  • How do you check how much space is left in current drive?
    9·1 answer
  • Which category of management information systems (MIS) combines the forecasting capability of decision support software with the
    12·1 answer
  • Which is true about POP3 and IMAP for incoming email?
    14·1 answer
  • What is the output of the following code:
    12·1 answer
  • I have no idea what I’m doing and this is due in 45 minutes
    7·1 answer
  • Team members can collaborate on ideas using telepresence. <br> true or false?
    10·1 answer
  • What does the x mean in .docx
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!