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
NullPointerException and ArithmeticException are both derived from which class?
irina1246 [14]

Answer: c) Run-time Exception

Explanation: Runtime Exception is the exception that works in the JVM(Java Virtual Machine) as a super-class. It can also act during the general working of the JVM and are not checked by any resources. The exception that are followed from the Runtime exception is Arithmetic exception and  Null pointer exception as the subclass. Therefore ,the correct option is option(c).

3 0
4 years ago
The length of a pencil would most likely be measured in:
Nataliya [291]
The length of the pencil would most likely be measured in centimeters.
6 0
3 years ago
Read 2 more answers
If someone said to you, “Pseudocode is a waste of time! It’s just more work because you end up writing the same program twice,”
myrzilka [38]

Answer:

It allows the designer to focus on main logic without being distracted by programming languages syntax.

* Since it is language independent, it can be translated to any computer language code.

* It allows designer to express logic in plain natural language.

* It is easier to write actual code using pseudocode.

* Unlike algorithms, pseudocodes are concise so pseudocodes are more readable and easier to modify.

Explanation:

8 0
3 years ago
To add color to the entire background of a page, users will select the ___ feature?
puteri [66]
The Fill color tab. Hope this helps!
5 0
3 years ago
Serveral cheetas are growling at each other while hunting for animals.for which need are they competing?
SVEN [57.7K]

Answer:

prey

Explanation:

5 0
3 years ago
Other questions:
  • __________ involves analyzing a large amount of data to extract knowledge and insight
    13·1 answer
  • Which of the following patterns of cell phone use can be observed in this chart
    12·1 answer
  • The Change Speed command in Audacity lets you change which two things about a track at the same time?
    9·1 answer
  • One blog may have a greater social influence than another when it has_______?
    12·2 answers
  • In the Mouse Properties window, you can?
    8·1 answer
  • What is a multipurpose network device?
    10·1 answer
  • Justify any FOUR significant factors to remember when installing your motherboard
    7·1 answer
  • You wrote a program to compare the portion of drivers who were on the phone. Which statements are true? Select 4 options.
    12·1 answer
  • Besides a backup technician, who else would have encrypted backup passwords?
    7·1 answer
  • After Daniel performed poorly on a test, his teacher advised him to do some self-reflection to figure out how he could get a bet
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!