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
Olenka [21]
3 years ago
9

.Assume that an ArrayList named salarySteps whose elements are of type Integer and that has exactly five elements has already be

en declared and has been assigned values.
Write a single statement to assign the value 30000 to the first element of this array.

14.Assume that an ArrayList of Integers named salarySteps has been declared and initialized with some initial values.

Write a statement that assigns the value 160000 to the last element of the ArrayList salarySteps.

15.Assume that an ArrayList of Integers named a has been declared with 12 elements. The integer variable k holds a value between 0 and 6. Assign 15 to the array element whose index is k.

16.Assume that an ArrayList of Integers named a that contains exactly five elements has been declared and initialized. In addition, an int variable j has also been declared and initialized to a value somewhere between 0 and 3.

Write a single statement that assigns a new value to element of the ArrrayList indexed by j. This new value should be equal to twice the value stored in the next element of the ArrayList (i.e. the element indexed by j+1).
Computers and Technology
1 answer:
dlinn [17]3 years ago
5 0

Answer:

  • salarySteps[0] = 30000;    
  • salarySteps[4] = 160000;
  • a[k] = 15;
  • a[j] = a[j+1] * 2;

Explanation:

In the first statement, salarySteps is an ArrayList. Total elements in the list are 5. To assign the value 30000 to first element of the array, 0 is the index which is the position of that array element as the array starts from 0 index. 0 points to the starting element of the array salarySteps.

In the second statement 160000 is assigned to the last element of the array names salarySteps. As the total elements are 5, so the array index starts from 0 to 4. As the value is to be assigned to the last element of array list so this means that the index is 4.

In the third statement the the name of the Array list is a and it has 12 elements.  The k-th element of this array list has to be assigned the value of 15. So the statement is a[k] = 15 where k is the index and 15 is the value assigned to the k-th index of array list a.

In the fourth statement new value is to be assigned to the element of array list a which has an index j. The new value should be equal to twice the value in the next element of array list. This next value is pointed by the index j+1. So the statement is a[j] = a[j+1] * 2; where a is the array list j is the index of the array element which is equal to twice the value (multiplied by 2) stored in the next element to the index position j i.e. j+1.

You might be interested in
55 POINTS, IN JAVA
ikadub [295]

public class JavaApplication82 {

   

   public static void main(String[] args) {

       

       for (int i = 1; i <= 9; i++){

           for (int w = 0; w < i; w++){

               System.out.print("*");

           }

           System.out.println("");

           

       }

   }

   

}

This works for me.

6 0
3 years ago
What’s bigger 4,000,000 KB or 2.8 GB
Zanzabum

Answer:2.8 GB is bigeer

8 0
4 years ago
Read 2 more answers
Write the pseudocode for the following scenario. The final exam marks for 10 students are 65, 45, 78, 65, 89, 65, 79, 67, 75, an
tia_tia [17]

The pseudocode of the program serves as a prototype of the program

<h3>How to determine the pseudocode?</h3>

The pseudocode of the program is as follows:

  1. Start
  2. Declare array MARKS
  3. Input MARKS[0] to MARKS[9]
  4. Sort MARKS
  5. Print MARKS[9] ----- this prints the highest mark
  6. Print MARKS[0] ----- this prints the least mark
  7. FOR I = 0 TO 9; ADD MARK[I] TO TOTAL
  8. Print TOTAL
  9. Print TOTAL/10
  10. Stop

The above pseudocode gets input for the array; then sorts the array before performing the required operations

Read more about pseudocodes at:

brainly.com/question/24735155

4 0
2 years ago
Can you explain the GB part. The gigibiyte part, what does that mean when usung wifi off of a hotspot?
REY [17]
From how I interpret it, it means that you can use X amount of megabytes or gigabytes within the billing cycle. For example, if you went with $100/2 months for 10GB of data, you would pay $100 every 2 months, and within those 2 months you would be able to use 10 gigabytes of data. It looks like the average smartphone user uses about 3GB of data per month, but you'll have to gauge it based on what you normally use.
7 0
3 years ago
Writing down your main ideas, subpoints, and supporting material, then using geometric shapes and arrows to indicate logical rel
horsena [70]

The process that involves writing down your main ideas, subpoints, and supporting material, then using geometric shapes is mapping.

This includes uses of  arrows to indicate logical relationships.

<h3>What is mapping?</h3>

mapping can be regarded as the prescribed way of assigning an object to each object in one set a particular object.

Learn more about mapping at:

brainly.com/question/25168859

7 0
3 years ago
Other questions:
  • Describe a situation where it would be appropriate to use each of the six leadership styles described by Daniel Goleman
    7·1 answer
  • Reading is the process of transferring data, instructions, and information from memory to a storage medium.
    15·1 answer
  • Cover page styles in the cover page gallery match the preformatted styles in word, making it easier to create a coherent style b
    5·1 answer
  • John just opened a savings account and wants to maximize the account of interest you earn which of the following actions would e
    13·1 answer
  • ∑_(A,B,C,D,E)▒〖(2,4,6,8,10,12,14,16,18,20,22,24,26,28,30)〗
    8·1 answer
  • Five aplications of ict​
    10·1 answer
  • Is it important for a writer to include voice and point of view in writing because... Plz help
    15·1 answer
  • Jimmy wrote the procedure scoreToGrade which accepts as a parameter score - a quiz score in the range 0-100. The procedure is su
    8·1 answer
  • How can you tell the difference between subnet addresses and interface addresses?
    13·1 answer
  • What is the best way of farming exotics in destiny?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!