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...
-
As the bat flies at a constant speed of 0.04 v toward a large tree trunk (where v denotes the speed of sound) the bat emits an ultrasonic pulse. The pulse is reflected off the tree and returns to the...
-
When a suspected drunk driver blows 188 mL of his breath through the fuel-cell breathalyzer described in Section 20.7, the breathalyzer produces an average of 324 mA of current for 10 s. Assuming a...
-
1. How would you characterize the main economic, legal-political, and sociocultural difference influencing the relationship between the partners in Shui Fabrics? What GLOBE Project dimensions would...
-
Write a script called ChangeExtensions that accepts two file name extensions as arguments, and renames all files with the first extension to have the second extension. For example, Change Extensions...
-
You work in the human resources department of your company helping new employees fill out the necessary paperwork to get their first paycheck. There are a number of decisions that employees must make...
-
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...
-
You have two lenses at your disposal, one with a focal length 1 = +40.0 cm, the other with a focal length 2 = -40.0 cm. (a) Which of these two lenses would you use to project an image of a lightbulb...
-
Explain what an intervention is and how it fits into the organizational development process. What are the key considerations when deciding on an intervention? Describe how OD interventions should be...
-
What is the time and space complexity of this code? int A[ n ]; for (i = n / 2; i
-
How does the process of gastrulation transform the single-layered blastula into a multi-layered gastrula, and what are the key cellular movements involved?
-
BMP Corp is contemplating the acquisition of a plant which will cost the company RM150 million. The projected Earnings Before Interest and Tax (EBIT) stand at RM20 million. Two financial plans are...
-
Candyland has a net income of $700,000, depreciation expense of $200,000, and capital expenditures of $150,000. Candyland has an expected constant growth rate in FCF of 2.1%, and an average tax rate...
-
What is a 95% CI for the population mean of d? Suppose we decide a better measure of the effectiveness of the drug is the mean decrease in blood pressure rather than the measure of effectiveness used...
-
The Heese Restaurant Group manufactures the bags of frozen French fries used at its franchised restaurants. Last week, Heeses purchased and used 101,000 pounds of potatoes at a price of $ 0.70 per...
-
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...
-
Required Information [The following Information applies to the questions displayed below.] Simon Company's year-end balance sheets follow. At December 31 Assets Current Year 1 Year Ago 2 Years Ago...
-
Superior Company provided the following data for the year ended December 31 (all raw materials are used in production as direct materials): Selling expenses Purchases of raw materials Direct labor...
-
Correlle dishes are known for being mostly unbreakable in daily use. Kevin's 12-year-old son decided to test this "unbreakable" idea by throwing a plate hard onto the floor. It broke. what this is an...
Study smarter with the SolutionInn App