Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 3. (20 pts) Part A: A String str may contain letters (upper and lower case), digits and any other Unicode character (including spaces). Write

image text in transcribed
Question 3. (20 pts) Part A: A String str may contain letters (upper and lower case), digits and any other Unicode character (including spaces). Write Java code to count and print the total number of times each of the following appears in str 1. All upper case letters (A to Z) II. All digits (0 to 9) Part B: Write Java code to determine whether a String pat, occurs at least twice as a substring of the String str. If pat does not occur twice, then concatenate it twice to the end of str. Part C: Suggest two sample email addresses to be used as arguments for a call to the following method, such that the arguments are NOT identical, however, the method will return true. public static boolean agree (String email1, string ema112) String dl - emaill.substring (emaill.indexOf("")); String d2 = email2.substring(email2.indexOf("")); return dl.equals(d2)

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

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions

Question

Discuss globalization issues for small to medium-sized businesses.

Answered: 1 week ago