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
valina [46]
3 years ago
9

Declare an ArrayList of Strings. Add eight names to the collection. Output the Strings onto the console using the enhanced for l

oop. Sort the ArrayList using the method Collections.sort. Output the sorted List. Shuffle the list, and output the shuffled list. Note that Collections (with an s) is a class, while Collection is an interface. The Collections class has many useful static methods for processing interfaces, including the sort method. Search for a name in the list that exists; output the location where it was found. Search for a name that is not in the list. What location is reported? Convert the list to an array using toArray. Output the elements of the array. Convert the array back into a list using asList. Output the elements of the list.
Computers and Technology
1 answer:
guapka [62]3 years ago
4 0

Answer:

---------------------------

Explanation:

You might be interested in
Collaborative devices are web and mobile applications that allow users to share files, meet virtually in real-time, and assign t
const2013 [10]

Answer:

true

Explanation:

because collaborative devices are made to make work much productive and easier within a group. it's true since the following statements can result to productivity

6 0
3 years ago
Read 2 more answers
What’s considered the brain of a computer?
Colt1911 [192]

Answer: The computer brain is a microprocessor called the central processing unit (CPU).

Explanation:

The CPU is a chip containing millions of tiny transistors. It's the CPU's job to perform the calculations necessary to make the computer work -- the transistors in the CPU manipulate the data.

5 0
4 years ago
Read 2 more answers
Is B$4 is an example of a relative cell reference?
yawa3891 [41]
Yes it is because B$4<span> instructs Excel to keep the </span>cell reference<span> B4 (absolute). assumptions </span>
5 0
3 years ago
Create a function void process(char ch, int x, int y)- to accept an arithmetic operator (+,-./, in argum
saul85 [17]

Answer:

The program is as follows:

import java.util.*;

public class Main{

   public static void process(char ch, int x, int y){

if(ch == '+'){

    System.out.print(x+y);  }

else if(ch == '-'){

    System.out.print(x-y);  }

else if(ch == '*'){

    System.out.print(x*y);  }

else if(ch == '/'){

    if(y!=0){

        double num = x;

        System.out.print(num/y);      }

    else{

        System.out.print("Cannot divide by 0");     } }

else{

    System.out.print("Invalid operator"); }

 }

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int x, y;

 char ch;

 System.out.print("Enter two integers: ");

 x = input.nextInt(); y = input.nextInt();

 System.out.print("Enter operator: ");

 ch = input.next().charAt(0);  

 process(ch,x, y);

}

}

Explanation:

The function begins here

   public static void process(char ch, int x, int y){

If the character is +, this prints the sum of both integers

<em> if(ch == '+'){</em>

<em>     System.out.print(x+y);  }</em>

If the character is -, this prints the difference of both integers

<em> else if(ch == '-'){</em>

<em>     System.out.print(x-y);  }</em>

If the character is *, this prints the product of both integers

<em> else if(ch == '*'){</em>

<em>     System.out.print(x*y);  }</em>

If the character is /, this prints the division of both integers.

<em> else if(ch == '/'){</em>

<em>     if(y!=0){</em>

<em>         double num = x;</em>

<em>         System.out.print(num/y);      }</em>

<em>     else{</em>

<em>This is executed if the denominator is 0</em>

<em>         System.out.print("Cannot divide by 0");     } }</em>

Invalid operator is printed for every other character

<em>else{</em>

<em>     System.out.print("Invalid operator"); }</em>

<em> </em> }

The main begins here

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

This declares both integers

 int x, y;

This declares the operator

 char ch;

Get input for both integers

<em>  System.out.print("Enter two integers: ");</em>

<em>  x = input.nextInt(); y = input.nextInt();</em>

Get input for the operator

<em>  System.out.print("Enter operator: ");</em>

<em>  ch = input.next().charAt(0);   </em>

Call the function

 process(ch,x, y);

}

}

6 0
3 years ago
To become an audio technician, the most successful tactics might include the following. (Select all that apply).
Stella [2.4K]
There's no option to choose from?..
4 0
3 years ago
Read 2 more answers
Other questions:
  • Why is the rate of increasing performance slowing down? Please help
    8·1 answer
  • Websites often request information about you. You have a choice as to whether or not you provide this to them. What aspect of PA
    12·1 answer
  • Under the Right to Know Rule, employers need to include information on which one of the following in a written and complete haza
    5·1 answer
  • Why would a brokered CD pay more than a regular CD?
    13·1 answer
  • Which of the following STEM discoverers developed a new type of computer hardware?
    11·1 answer
  • Assignment: Write a complete MIPS program that implements the algorithm below (in C ). This algorithm calculates the factorial f
    13·1 answer
  • Original phone call greeting for oncologist
    10·1 answer
  • Sam plans to use this image in artwork for a brochure about airplanes. Which principles of page layout is Sam planning to use in
    11·1 answer
  • Which of the following are results of technological advancements and increased automation?
    6·2 answers
  • Read Chapter 2 in your text before attempting this project. An employee is paid at a rate of $16.78 per hour for the first 40 ho
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!