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
xeze [42]
3 years ago
9

Java Array question.

Computers and Technology
1 answer:
kodGreya [7K]3 years ago
3 0

Answer:

3) 3 44 44

Explanation:

Given data

int [] val = { 3, 10, 44 };

The total number of parameters of given array are 3, so total length of array is also 3.

The indexing of array starts with '0', Therefore the <u>indexes</u> of array with length zero are: {0,1,2}

The value of array at index 0 is = 3

similarly

value at index 1 = 10

value at index 2 = 44

Here, Int i = 1 is storing the value '1' in integer variable i.

In addition to that, any value of index 'i' of an array is selected using array[i].

Therefore,

val[i] is selecting the value of array located at index '1' because i = 1.

val[i] = val[1] = 10

val[i+1] is selecting the value of array located at index 'i+1' that is (1+1) =2

val[i+1] = val[2] = 44

Finally,

val[i] = val[i + 1]; is copying the value placed at index 2 (44) to value placed at index 1 (10). Hence, the output would be {3 44 44}. So 3rd option is correct.

 

You might be interested in
Ed-Only g - Last Modified: November 2 -
valina [46]

Answer:

Could u state this more clearly

Explanation:

6 0
3 years ago
PLEASE HELP
Alborosie
The_____ feature of the spreadsheet will enable Susan to highlight the records.
FORMAT CELLS
3 0
3 years ago
Read 2 more answers
A goal should be___.
Luda [366]

Answer:

D

Explanation:

5 0
3 years ago
Read 2 more answers
Using underlining and italics at the same time is which of these? A. allowed but might be overkill B. always a good idea C. not
Alex777 [14]

A. Allowed but might overkill

6 0
3 years ago
Read 2 more answers
What is a common source of connection problems with ethernets?
Katarina [22]
B) the auto-sensing mechanism
4 0
3 years ago
Read 2 more answers
Other questions:
  • What aspect do you need to keep in mind when you add images in a word document?
    11·2 answers
  • Which us electronic company was the pioneer in home video game consoles?
    13·1 answer
  • Rerouting traffic using arp poisoning is an attack on ________ of a network.
    8·1 answer
  • When a binary tree is full to its next to last level and its leaves on the last level are filled from left to right the tree is
    14·1 answer
  • Select the correct answer.
    8·1 answer
  • What is the limitation of computer<br>​
    5·1 answer
  • Describe how serial data access finds data
    9·2 answers
  • This software application can be used to organize, analyze, and illustrate data?
    12·2 answers
  • Why is it important to think about the programming language to use?
    6·1 answer
  • Please please help I don’t understand this
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!