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
rewona [7]
3 years ago
8

Write a program that asks the user for three strings. Then, print out whether the first string concatenated to the second string

is equal to the third string. Here are a few sample program runs: Sample Program 1: First string
Computers and Technology
1 answer:
zepelin [54]3 years ago
5 0

Answer:

import java.util.Scanner;

public class Main {

   public static void main(String[] args) throws Exception {

          Scanner myObj = new Scanner(System.in);

        //Request and receive first String

       System.out.println("Enter username");

       String firstString = myObj.nextLine();

       

       //Request and receive second string

       System.out.println("Enter second string");

       String secondString = myObj.nextLine();

       

         //Request and receive third string

       System.out.println("Enter third string");

       String thirdString = myObj.nextLine();

       //Concatenate the first and second string

       String concatA_B = firstString + secondString;

       

       if(concatA_B.equals(thirdString)){

           System.out.println("First String Concatenated to Second String is equals to the third String");

       }

       else{

            System.out.println("First String Concatenated to Second String is NOT equals to the third String");

       }

   }

}

Explanation:

  • Import Scanner Class
  • Request and Receive three variables from the user using the Scanner Class
  • Concatenate the first and second
  • Use the .equals() method to check for equality
You might be interested in
What is the main role of LDAP?
NISA [10]

Answer:

Run directory services

Explanation:

LDAP (Lightweight Directory Access Protocol) is an open protocol used to access some information, information that is stored in a network, the information is organized hierarchical structure, we could find some data like names, directories, and telephone numbers.

With other options, we can find DHCP to assign IP addresses and to resolve IP addresses to host names, we have the DNS.

7 0
3 years ago
Please help im not good at computer class ​
Veronika [31]

Answer:

W.

Explanation:

4 0
3 years ago
Read 2 more answers
Please help! i need to answer this soon!
natali 33 [55]

Answer:

1. a modem connects a computer to the internet  

4. a modem transmits digital signals over a telephone line

5. a dial-up modem communicates using a telephonic call​

All of three mentioned above.

Modem stands for modulator de-modulator, and it connects the computer to the internet. Its not the fastest, which is router. And the connection is established via the telephone line, through which the digital signals is being transmitted, And the type used is dial up communication.

Explanation:

The answer is self explanatory.

4 0
3 years ago
Why is OS important in every data processing system? <br>Please Answer Fast! ​
Artist 52 [7]

Answer:

Functions of an operating system. An operating system provides three essential capabilities: It offers a UI through a CLI or GUI; it launches and manages the application execution; and it identifies and exposes system hardware resources to those applications -- typically, through a standardized API.

Explanation:

6 0
2 years ago
Arrange the code so that the numbers are swapped.
Ahat [919]
Rand.int(your_num , your_num
5 0
2 years ago
Other questions:
  • Over time, attackers have had to increase their skills to be able to attack systems or create viruses. True False
    8·1 answer
  • Optimally, the __________ guides investment decisions and decisions on how ISs will be developed, acquired, and/or implemented.
    6·1 answer
  • A file extension of .xlsx means that the file contains what? *
    12·2 answers
  • Which evaluation factor will be most important when choosing technology for the company
    5·1 answer
  • Olivia is trying to save for a new laptop computer. To help her save, she should start a _____. database financial statement per
    7·2 answers
  • What is your favourite video game??​
    5·2 answers
  • A computer is performing a binary search on the sorted list of 7 numbers below. What is the maximum number of iterations needed
    15·1 answer
  • What is the name of the arm that is attached to the read/write head?
    13·1 answer
  • what impact of information communication technology have on the environment about electronic waste, use of electricity?​
    9·1 answer
  • What is computer fundamental ?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!