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
Snowcat [4.5K]
3 years ago
7

Write a program that asks the user to enter three names, and then displays the names sorted in ascending order. For example, if

the user entered "Charlie", "Leslie", and "Andy", the program would display: Andy
Computers and Technology
1 answer:
Sati [7]3 years ago
8 0

Answer:

Explanation:

//import the package

import java.util.Scanner;

import java.util.Arrays;

//create the arrays

private static String[] names = new String[3];

/we ask the 3 names

     Scanner scan = new Scanner(System.in);    

  System.out.println("You must enter 3 names");

  //a for cycle to get the names

  for(int i=0;i<names.length;i++){

   System.out.println("Enter name: ");

   names[i]= scan.next();

  }

               // we print in order

  scan.close();

  Arrays.sort(names);  

  System.out.println("Sorted List "+Arrays.toString(names));

}

}

You might be interested in
How do you turn on the Track Changes feature in a word-processing document?
aniked [119]
Click options in the tools menu and select track changers
5 0
3 years ago
In a proper webpage, which tag holds all of a webpages visible HTML?
Evgen [1.6K]

Body.


head contains all of the data that we generally don't see.


Link is used to link to external stylesheets.


script is where you would type scrips.


doctype is used to tell the browser the document type.

6 0
3 years ago
Charles Montesquieu believed that the
kakasveta [241]

Answer:

A. Make Laws

Explanation:

Montesquieu believed the ways to go about limiting the power of a monarch would be to split up power among 3 groups, Judicial, Legislative and Executive. The American Presidential system and Constitution used Montesquieu's writings as a foundation for their principles.

  1. Judicial Interprets laws
  2. Legislative Makes laws
  3. Executive Enforces Law

6 0
3 years ago
Read 2 more answers
What is computer hardware?list any 4 computer hardware​
Scilla [17]

Computer hardware includes the physical parts of a computer, such as the case, central processing unit (CPU), monitor, mouse, keyboard, computer data storage, graphics card, sound card, speakers and motherboard. By contrast, software is the set of

8 0
3 years ago
Read 2 more answers
At the heart of every computing device is a(n) _______________, which is usually a single, thin wafer of silicon and tiny transi
SSSSS [86.1K]

Answer:

CPU

Explanation:

Central Processing UnitUnit

5 0
3 years ago
Other questions:
  • Most internet connections use what transmission
    13·2 answers
  • What is batch processing?
    12·1 answer
  • Vhat is output by the code below?<br><br> PLEASE HELP!! TIME LIMIT!!
    5·1 answer
  • Use the _____ and _____ features to prevent field columns from showing or to view two nonadjacent field columns for comparison.
    6·1 answer
  • How do u make a bored builder
    8·2 answers
  • You are running out of storage space on one of your servers. you need to purchase an external hard drive, as there are no drive
    8·2 answers
  • 50 POINTS &amp; A FOLLOW!
    11·2 answers
  • When you use the .net data provider objects to retrieve data from a database, you can store the data in an object called a?
    8·1 answer
  • Instructions
    15·1 answer
  • OH GOD PLEASE HELP I CAN'T FIGURE THIS OUT-
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!