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
elixir [45]
4 years ago
8

Suppose list1 is an MyArrayList and list2 is a MyLinkedList. Both contains 1 million double values. Analyze the following code:

A: while (list1.size() > 0) list1.remove(size() - 1); B: while (list2.size() > 0) list2.remove(size() - 1); Question 42 options:
Computers and Technology
1 answer:
hjlf4 years ago
7 0

Answer:

The correct answer for the given question is " The Code fragment A runs fastly than the code fragment of B".

Explanation:

In this question there are some information is missing i. e options. The question does not give any options. The options for the given question is given below

(A.) The Code fragment A runs fastly than the code fragment of B.

(B.) The Code fragment B runs fastly than code fragment of  A.

(C)  The Code fragment A runs as fastly as code fragment of B.  

So we conclude the answer i.e option(A) because As given in the question list1  is a MyArrayList and list2 is a MyLinkedList.  , in list1 we fetching the data easily and fastly means that it remove the data easily as compare to list2 As MyArrayList is storing the list only and also we can fetch the data easily manner.

The list2 is an object of MyLinkedList means that it manipulating the data fastly as compared to MyArrayList but if we compared the fetching of data then  MyArrayList is a better option so the code fragment runs fastly then code fragmented B.

You might be interested in
QUESTION 4 of 10: True or False: According to the reading, investors care about your love for your business.
mixer [17]

Answer:

false

Explanation:

5 0
3 years ago
Read 2 more answers
rite a program to perform time conversion. The user will select from the following menu: Hours to minutes Days to hours Minutes
Vinvika [58]

Answer:

import java.util.Scanner;

public class TimeConversion

{

public static void main(String[] args) {

   

    Scanner input = new Scanner(System.in);

           

       System.out.print("1. Hours to minutes\n2. Days to hours\n3. Minutes to hours\n4. Hours to days\n");

       System.out.print("Enter your choice:");

       int choice = input.nextInt();

       

       switch(choice) {

           case 1:

               System.out.print("Enter the number of hours:");

               int hour = input.nextInt();

               System.out.println("There are "+ hour*60 + " minutes in " + hour + " hours");

               break;

           case 2:

               System.out.print("Enter the number of days:");

               int day = input.nextInt();

               System.out.println("There are "+ day*24 + " hours in " + day + " days");

               break;

           case 3:

               System.out.print("Enter the number of minutes:");

               int minute = input.nextInt();

               System.out.println("There are "+ minute/60 + " hours in " + minute + " minutes");

               break;

           case 4:

               System.out.print("Enter the number of hours:");

               int h = input.nextInt();

               System.out.println("There are "+ h/24 + " days in " + h + " hours");

               break;

           default:

               System.out.println("Invalid Input!");

       }

}

}

Explanation:

- Print the menu

- Ask the user to choose one of the options

- Depending on the choice, use switch-case statement to calculate and print required conversion

- Print an error message if the user enters a number that is not in the menu

7 0
3 years ago
How do advertisers use data to know which products would most likely appeal to you
olga2289 [7]

Answer:

They track ur FB and Instagram posts and "likes." Amazon, Target and other online retailers are able to process orders so quickly

4 0
3 years ago
Which number on the image above correctly indicates the name of a folder in this URL?
Anna35 [415]
The answer is definitely C. 3
4 0
3 years ago
Please help!!!! what is the meaning of M,I,C,R,O,S,O,F,T word?
galina1969 [7]

Answer:

Microsoft (the word being a portmanteau of "microcomputer software") was founded by Bill Gates and Paul Allen on April 4, 1975, to develop and sell BASIC interpreters for the Altair 8800. It rose to dominate the personal computer operating system market with MS-DOS in the mid-1980s, followed by Microsoft Windows

Explanation:

if you need full answer this is it

4 0
3 years ago
Other questions:
  • Which is the output of the formula =XOR(120<102;83=83;51<24)??
    11·2 answers
  • An automated search feature used by search engines to find results that match your search terms is called a spider or ?
    5·1 answer
  • If you're currently using text, display, and video ads but also want to more specifically control spending on ads that appear wh
    10·1 answer
  • CHALLENGE
    10·1 answer
  • 2.cite at least 2 example on how multimedia facilitates learning​
    6·1 answer
  • For each of the following memory accesses indicate if it will be a cache hit or miss when carried out in sequence as listed. Als
    15·1 answer
  • The given SQL creates a Movie table with an auto-incrementing ID column. Write a single INSERT statement immediately after the C
    12·1 answer
  • If you got band from a local library, what would be the reason for it besides shouting and talking? You're answer has to fit you
    15·2 answers
  • 1.Which one of the following buttons returns a window to its original size?
    11·1 answer
  • Write a short program that asks the user to enter a month & prints a message based on the month
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!