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: 62% (8 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...
-
Under appropriate experimental conditions, H2 and CO undergo a combination reaction to form CH3OH. The following drawing represents a sample of H2. Make a corresponding drawing of the CO needed to...
-
Identify actions that should be taken during the process of closing a project
-
Tidwell Corporation issued a 4 percent stock dividend on 20,000 shares of its $10 par common stock. At the time of the dividend, the market value of the stock was $30 per share. Required a. Compute...
-
In case of limited liability companies (LLCs), all the members are equally liable to third parties regardless of the owner's level of participation. True False
-
The company Smart Inc. is a company that produces Dog Shampoo in Toronto area. The results of the company, which has been mediocre for the past couple of years, have been presented in the annual...
-
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...
-
Using the sample project from this chapter, perform a sensitivity analysis (+/-10 basis-points) of r's effect on NPV, starting from its base value for this project of 9.40 percent. Which of the...
-
6.10 Long Div. and Comp Square Calculus - No Calculator Find the indefinite integral. 1. S 4x-34x+56x-21 4x-2 dx Mastery Check #2 1 dx 2. Sx-4x+5x x-4x+5 S S Name: Sienna Nono Date: 3-1-24 Period:...
-
How well are oncology firms leveraging digital technology to gain and sustain competitive advantage?
-
Axel and Brooklyn have agreed to buy a new vehicle. Brooklyn mentions that she is looking forward to getting a new SUV, so they have room for their dogs and kids. Axel mentions he thought they were...
-
Discuss how technology and human resources are needed to operate this facility in this behind the scenes look at this retailing giant. Support your opinion with research and/or key concepts covered...
-
4.2 At a given instant, a spacecraft is 500 km above the earth, with a right ascension of 300 and a declination of -20 relative to the geocentric equatorial frame. Its velocity is 10 km/s directly...
-
South Africas real GDP was 1,900 billion rand in 2011 and 1,970 billion rand in 2012. South Africas population was 50.5 million in 2011 and 51.0 million in 2012. Calculate: a. The growth rate of real...
-
Linda Lopez opened a beauty studio, Lindas Salon, on January 2, 2011. The salon also sells beauty supplies. In January 2012, Lopez realized she had never filed any tax reports for her business and...
-
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...
-
If Total Assets are $2,100 and Total Equity is $1,600 then what is the value of Total Liabilities?
-
Date Account and Explanation Debit Credit Jun 1 Cash 105,000 Jun 1 Capital 105,000 (capital contribution) Jun 1 Computer Equipment 56,000 Jun 1 Cash 56,000 Jun 1 Cash 198,000 Jun 1 Bank Loan Payable...
-
.Is bankruptcy on the part of the borrower a common risk that frequently interferes with a lenders efforts to work out a defaulted loan through either nonforeclosure means or foreclosure? Discuss.
Study smarter with the SolutionInn App