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
olya-2409 [2.1K]
4 years ago
5

Print the two strings in alphabetical order. assume the strings are lowercase. end with newline. sample output: capes rabbits

Computers and Technology
2 answers:
steposvetlana [31]4 years ago
4 0

Here you go,

Program:

import java.util.Scanner;

public class OrderStrings {

    public static void main(String[] args) {

         String firstString;

         String secondString;


         firstString = "rabbits";

         secondString = "capes";

         int status = firstString.compareTo(secondString);


         if(status<0)

         {

              System.out.println(firstString + " " +  secondString);

         }

         else

         {

              System.out.println(secondString + " " + firstString);

         }

         return;

    }

}

s2008m [1.1K]4 years ago
3 0

Answer:

To print the two strings in alphabetical order if the strings are in lower case and end with a new line, first define a class and store the values in string variables. After this, compare the string using compareTo() function and finally print the result.

Further Explanation:

Code: Following is the JAVA code that prints the two strings in alphabetical order where strings are in lower case and end with new line.

import java.util.Scanner;

//definition of the class

public class StringOrder  

{

public static void main(String[] args)  

{

// define the variables

String firstString;

String secondString;

// assign values to the strings

firstString = "rabbits";

secondString = "capes";

// compare the strings

if(firstString.compareTo(secondString)<0)

{

System.out.println(firstString+""+secondString);

}

else

{

System.out.println(secondString+""+firstString);

}

return;

}

Learn more:  

1. A company that allows you to license software monthly to use online is an example of ? brainly.com/question/10410011  

2. Prediction accuracy of a neural network depends on _______________ and ______________. brainly.com/question/10599832  

3. The shape of our galaxy was determined ‘on the inside looking out' by surveying the milky way using ____________ telescopes. brainly.com/question/7866623  

4. List 3 characteristics of the ideal encryption scheme. brainly.com/question/3000161

Answer details:

  • Grade: College Engineering
  • Subject: Computer Science and Engineering
  • Chapter: Java Programming

Keyword:  

Java programming, python, C++, print, two strings, alphabetical order, lower case, upper case, output, capes rabbits, compare, loops, variables, first string, second string, scanner class

You might be interested in
Ith what frequency do balance changes happen in the game?​
Akimi4 [234]
What game ? I’m not sure what ur trying to ask
8 0
4 years ago
Read 2 more answers
Escribe un ejemplo de:• Software de aplicación. • Software de diagnóstico. • Software de sistema. ayudenme plis, me toca entrega
Afina-wow [57]

Answer:

1. Software de aplicación: Microsoft Word.

2. Software de diagnóstico: Speccy.

3. Software de sistema: Windows operating system (OS).

Explanation:

Un software puede definirse como un conjunto de instrucciones ejecutables (códigos) o una colección de datos que se utiliza normalmente para instruir a una computadora sobre cómo realizar una tarea específica y resolver un problema en particular.

Básicamente, los softwares se clasifican en tres (3) categorías principales y estas son;

1. <u>Software de aplicación</u>: es un software de usuario final que normalmente está diseñado para realizar tareas y funciones específicas.

Algunos ejemplos de software de aplicación son Microsoft PowerPoint, Notepad, Windows Media player, Firefox, Go-ogle Chrome, Adobe Photoshop, AutoCAD, etc.

2. <u>Software de diagnóstico</u>: estos son programas de software que se utilizan para solucionar problemas y posiblemente reparar un sistema informático.

Algunos ejemplos de software de diagnóstico son Speccy, Windows Sysinternals Suite, System Explorer, hddscan, HWiNFO, SIW (System Information for Windows), CPU-Z, HD Tune, etc.

3. <u>Software de sistema</u>: es un software que normalmente está diseñado para ejecutar el hardware de la computadora y todas las demás aplicaciones de software.

Algunos ejemplos de software del sistema son Linux, Windows OS, Mac OS, WinZip, McAfee antivirus, Norton antivirus, Avast antivirus, Piriform CCleaner, Ubuntu, etc.

8 0
3 years ago
If you could create a social network, what would it be like? What would make it so special about the others? (If you want you ca
patriot [66]
Be able to contact and connect with other users. be able to share what your doing.
7 0
4 years ago
The web development team is having difficulty connecting by ssh to your local web server, and you notice the proper rule is miss
joja [24]

Answer:

Option b (Port 22) seems to the appropriate choice.

Explanation:

<u>Below seem to be some measure you should take to correct this mistake.</u>

  • Verify whether Droplet's host IP address seems to be right.  
  • Verify existing connection supports communication over all the utilized SSH port. Any access points can be able to block port 22 and sometimes customized SSH. For illustration, you could do this by checking different hosts who used the same port, using only a recognized working SSH connection. These could help you identify unless the current problem is not particular to clients' Droplet.
  • Authenticate the Droplet configuration settings. Verify that they're not being configured to DROP 's preferred policy, and do not apply the port to require connectivity.

The SSH server also operates on port 22, by default.  

Other choices don't apply to the specified scenario. So that the argument presented above will be appropriate.

7 0
3 years ago
During the installation of Windows Server 2019 Standard Edition, you encounter a disk that is marked as Disk 0 Unallocated Space
sp2606 [1]

There are different kinds of system software.  What should you do to complete the installation on this disk is to Create a new partition and then perform the installation

<h3>How are Hands-On Projects done?</h3>

This kind of project are often  completed in the right order that they were given and it often take about three hours or less to complete it in general. This projects needs:

• A system that has Windows Server 2019 that is said to be already installed based on  Hands-On Project 1-1/1-2.

• A Windows Server 2019VM2 virtual machine  also installed based  on Hands-On Project 3-5.

Note that when one wants to install an operating system, one has to  drive or make partition available so as to copy all the files..

During the installation of Windows Server 2019 Standard Edition, you encounter a disk that is marked as Disk 0 Unallocated Space on the Windows Setup wizard.

What should you do to complete the installation on this disk?

Create a new partition and then perform the installation

Load the device drivers for the Disk

Click Next to proceed with the installation

Format the disk using the Format option

Learn more about Windows Server from

brainly.com/question/25554117

6 0
2 years ago
Other questions:
  • Help pls<br><br> What type of link is used to call this file?
    5·2 answers
  • A client contacted you to request your help in researching and supplying the hardware necessary to implement a SOHO solution at
    5·1 answer
  • BRALYEST TO FIRST PERSON THAT IS CORRECT!!! Select the correct navigational path to add titles to your printable worksheet. Clic
    9·2 answers
  • PLZZZ HELP ME THIS IS THE THIRD TIME!!! BRAINLIEST AND 50 POINTS What are the advantages and disadvantages of top-down and botto
    9·1 answer
  • Renee's creating a plan for her business's information system. What should she do after she determines the goals for her busines
    10·1 answer
  • Methods can be ____ correctly by providing different parameter lists for methods with the same name.
    7·1 answer
  • 8. How can you prevent your VMs receiving DHCP server messages from unauthorized virtual machine pretending to be DHCP servers?
    6·1 answer
  • What is impact of Internet<br> in our lives
    7·1 answer
  • Follow the directions below to submit Assignment 2:
    11·1 answer
  • Animations<br> Animations are !<br> Blank which can be Applied to blank in a presentation?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!