Modify the CharacterInfo class shown in Figure 7-3 so that the tested character is retrieved from user
Question:
Transcribed Image Text:
public class CharacterInfo { public static void main(String[] args) char aChar = 'C'; System.out.println("The character is " + aChar); if(Character.isUpperCase(aChar)) System.out.println(aChar + " is uppercase"); else is not uppercase"); System.out.println(aChar + if(Character.islowerCase (aChar)) System.out.println(aChar + " is lowercase"); else System.out.println(aChar + " is not lowercase"); aChar = Character.tolowerCase(aChar); System.out.println("After tolowerCase (), aChar is aChar = Character.toUpperCase (aChar); System.out.println("After toUpperCase (), aChar is + aChar); + aChar); %3D if(Character.isletterOrDigit(aChar)) System.out.println(aChar + " is a letter or digit"); else System.out.println(aChar + " is neither a letter nor a di git"); if(Character.i swhi tespace (aChar)) System.out.println(aChar + " is whitespace"); else System.out.println(aChar + " 1s not whitespace");
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 57% (7 reviews)
import javautilScanner public class InputCharacterInfo public static void mainString args char aChar ...View the full answer
Answered By
Muhammad Umair
I have done job as Embedded System Engineer for just four months but after it i have decided to open my own lab and to work on projects that i can launch my own product in market. I work on different softwares like Proteus, Mikroc to program Embedded Systems. My basic work is on Embedded Systems. I have skills in Autocad, Proteus, C++, C programming and i love to share these skills to other to enhance my knowledge too.
3.50+
1+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
1. Explain the advantages of locating the PRIDE database in the clouded. Flores and his partners could place it on one of their own servers in the practice. Give reasons why it would be unwise for...
-
1. The log shown in Figure 7-19 includes four transactions that completed successfully. For each of the four transactions, list the transaction ID and the table(s) modified. Also, list whether the...
-
Consider the client buffer shown in Figure 7.3. Suppose that the streaming system uses the third option; that is, the server pllshes the media into the socket as quickly as possible. Suppose the...
-
Read the Comp & Ben Case Study and answer the following question: To the degree job growth (and increased car sales that come from m costs) is based on two tier-wage structures, how sustainable...
-
Elizabeth made the following interest-free loans during the year. Assume that tax avoidance is not a principal purpose of any of the loans. Assume that the relevant Federal rate is 5% and that the...
-
For the following exercises, determine the amplitude, period, and midline of the graph, and then find a formula for the function. Give in terms of a sine function. y 64 2+ -2 NA -4 2 X
-
Electronic Parts, Inc., a manufacturer of woofers and chips for computers, employs activity-based costing. Compute activity-based overhead rates from the following budgeted data for each of the...
-
Graphics Service Co. purchased a new color copier at the beginning of 2013 for $47,000. The copier is expected to have a five-year useful life and a $7,000 salvage value . The expected copy...
-
For problems 3 and 4, find the missing side of the triangle. Leave answers in simplest radical form. (2 points each) 8 17cm 8cm 12 3. 4.
-
Can students throw a baseball farther than a softball? To find out, researchers conducted a study involving 24 randomly selected students from a large high school. After warming up, each student...
-
Unlike when you create a String, when you create a StringBuilder, you must use the keyword ____________. a. buffer b. new c. null d. class
-
Write an application that prompts the user for three first names and concatenates them in every possible two-name combination so that new parents can easily compare them to find the most pleasing...
-
What taxes may be imposed on an S corporation?
-
While he is in college, Steve is living in his parent's basement suite. He pays $410 rent at the end of each month. His parents have made him a great offer. If he completes college in two years with...
-
Assignment Overview This lab focuses on defining and using functions. The Problem You will write a program that asks the user if they want a calculation for the surface area or volume of a cone. The...
-
Stacey had $65,286 of income from wages and $298 of taxable interest. Stacey also made contributions of $3,700 to a tax-deferred retirement account. Stacey has 1 dependent and files as married filing...
-
Based on the flexible budget from Scenario 1, prepare a performance report if the company has the following actual costs for 3,500 units this month: Actual production was 3,500 units. Actual direct...
-
How can ERP systems help in streamlining procurement processes and supplier relationship management?
-
Calculate y'. y = 3 x In x
-
(a) Bright Sdn Bhd (BSB) is a tax resident manufacturing company in Johor, which involves in ceramic tiles. Currently, BSBs annual sales turnover has been forecasted to be around RM 300,000 for the...
-
When you do not know how many items need to be sorted in a program, you can create an array that has _____. a. Variable-sized elements b. At least as many elements as the number you predict you will...
-
In a bubble sort, on each pass through the list that must be sorted, you can stop making pair comparisons _____. a. One comparison sooner b. Two comparisons sooner c. One comparison later d. Two...
-
When performing a bubble sort on a list of 10 values, you can stop making passes through the list of values as soon as _____ on a single pass through the list. a. No swaps are made b. Exactly one...
-
Which of the following statements accurately describe risk? Select all that apply. 1 point If compromised, a medium-risk asset may cause some damage to an organization's finances. Organizations often...
-
The following question comes from Chapter 2 of the course textbook, Economics and Financial Management for Nurses and Nurse Leaders (3rd ed., 2017), by S. J. Penner and are edited for formatting. An...
-
Margot reviews the financial statements of a potential investment target. She notices that in the company's multiple-step income statement a separately listed gain is reported as part of "income from...
Study smarter with the SolutionInn App