Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java String Builder Problem. I need the second input found in the StringBuilder to be converted to uppercase. The second input should be capitalized and

Java String Builder Problem.

I need the second input found in the StringBuilder to be converted to uppercase. The second input should be capitalized and if those same letters are found in the first string then they should be converted to uppercase letters. See required input and output below.

Must use the class public class demo2 below.

import java.util.Scanner; public class CaseDemo2 { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); System.out.println("Enter some String"); StringBuilder sb = new StringBuilder(keyboard.nextLine()); System.out.println("Which letters should be converted to uppercase?"); String chars = keyboard.nextLine(); ParsingUtils.changeLetter(sb, chars); System.out.println(sb); } } 
Standard Input
aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz abcxyz 

Required Output

Enter a String Which characters should be converted to uppercase? AABBCCddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwXXYYZZ 
Standard Input
aaabbbcceeefghj abc 
Enter a String Which characters should be converted to uppercase? AAABBBCCeeefghj 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

b. What groups were most represented? Why do you think this is so?

Answered: 1 week ago

Question

3. Describe phases of minority identity development.

Answered: 1 week ago

Question

5. Identify and describe nine social and cultural identities.

Answered: 1 week ago