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
erica [24]
4 years ago
12

Write a java program that will take 2 String inputs and perform the following operation on them: a) Show length of the strings b

) Concatenate two strings c) Convert those two strings to uppercase.
Computers and Technology
1 answer:
marissa [1.9K]4 years ago
6 0

Answer:

// here is code in java.

import java.util.*;

// class definition

class Solution

{

   // main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

 // scanner object to read input from user

Scanner scr=new Scanner(System.in);

 // string variables

String st1,st2;

System.out.print("enter the first string:");

 // read the first string

st1=scr.nextLine();

System.out.print("enter the second string:");

 // read the second string

st2=scr.nextLine();

// part (a)

 // find length of each string

System.out.println("length of first string is: "+st1.length());

System.out.println("length of second string is: "+st2.length());

//part(b)

 // concatenate both the string

System.out.print("after Concatenate both string: ");

System.out.print(st1+st2);

// part(c)

 // convert them to upper case

System.out.println("first string in upper case :"+st1.toUpperCase());

System.out.println("second string in upper case :"+st2.toUpperCase());

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read two strings st1 and st2 with scanner object.In part a, find the length of each string with the help of .length() method and print the length.In part b, concatenate both the string with + operator.In part c, convert each string to upper case with the help of .toUpperCase()  method.

Output:

enter the first string:hello

enter the second string:world!!

length of first string is: 5

length of second string is: 7

after Concatenate both string: hello world!!

first string in upper case :HELLO

second string in upper case :WORLD!!

You might be interested in
I'd: 9872093250, password: qqqqq, join the meeting​
jenyasd209 [6]
No thanks but Happy Mother’s Day!!!
8 0
3 years ago
What is also known as a visual aid in a presentation?
kap26 [50]

Answer:

Option D i.e., slide are the correct option.

Explanation:

The following option is true because in the PowerPoint presentation slide is the visual aid. With the help of the visual aid, the user can add the acumen to its PowerPoint presentation and it is the item in which the user can summarize their information and data that is slide. It is important for the creation of the official or the business purpose presentation.

3 0
4 years ago
Read 2 more answers
Desktop operating systems sometimes are called ______ operating systems because they also work in conjunction with a server oper
valina [46]
<span>Client, because they are a part of the server operating system request line. The client asks for a request for information or data from the provider (the server) and the server provides this to its client (the desktop computer). They work together hand in hand one is recieving information and one is sending information</span>
4 0
4 years ago
Consider the given choices and determine which one establishes a conceptual framework for network connectivity.
Snezhnost [94]

Of the given choices, the option that establishes a conceptual framework for network connectivity is OSI model.

<h3>What is network connectivity?</h3>

Network connectivity is a term that tells more about the process of connecting different areas of a network to each other.

Conclusively, the OSI Model often called Open Systems Interconnection Model is known to be the conceptual framework that tells the functions or duties of a networking system.

Learn more about  network connectivity from

brainly.com/question/26956118

5 0
2 years ago
Flujograma de nómina ​
balu736 [363]
Explanation there is the rest in comments

7 0
3 years ago
Other questions:
  • Ann wants to create a bookmark. She should
    9·2 answers
  • Which of the following is CORRECT about database managementsystem's languages?
    6·1 answer
  • Which VMware product would allow administrators, to manage enterprise desktops with increased reliability, security, end-user ha
    11·1 answer
  • What is a GUI?
    11·1 answer
  • Create a cell reference in a formula by typing in the cell name or
    7·2 answers
  • What is the importance of internet safety?
    11·1 answer
  • How do you invite someone to a conversation on brainly
    14·1 answer
  • Excel files have a default extension of ?
    12·1 answer
  • Gavin is making a new logo for his business. He uses drawing software to create a unique. Which file format does he use to creat
    5·1 answer
  • If ADD = 81, BAD = 49, and CAD = 64, then what is the value of ACA?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!