The following code is supposed to output the string in lowercase letters but it has an error. What is wrong?
Want to see the full answer?
Check out a sample textbook solutionChapter 1 Solutions
Absolute Java (6th Edition)
Additional Engineering Textbook Solutions
Concepts Of Programming Languages
Java: An Introduction to Problem Solving and Programming (7th Edition)
Problem Solving with C++ (10th Edition)
Java How To Program (Early Objects)
Starting Out with Python (3rd Edition)
- JAVA Write a substring expression to extract “Exam” from the following String. String str= “Final Exam”;arrow_forwardIn the class String, the substring method inserts a String into another String. -True or -Falsearrow_forwardBriefly describe each of the following string object methods: Insertarrow_forward
- Debugging: Find the error if there's any and rewritearrow_forwardWrite a method that accepts a string as an argument and checks it for proper capitalization and punctuation. The method should determine if the string begins with an uppercase letter and ends with a punctuation mark. The method should return true if the string meets the criteria; otherwise it should return false.arrow_forwardQ2-Write a java program that has a method called stringDay to display the string named Day based on the number of day entered by the user. The method should take one argument and return a String(name of the (dayarrow_forward
- String personName is read from input. Output personName left aligned with a width of 6, followed by " Taylor". End with a newline. Ex: If the input is Juno, then the output is: Juno Taylorarrow_forwardGiven: boolean test; char x; Use a Character class method, to write a Java statement to assign true to test if x character is a letter. Note: Do not use if statement here. TTT Arial v 3 (12pt) Click Save and Submit to save and submit. Click Save All Answers to save all answers.arrow_forwardThe method lower() returns a string with all the characters converted to lowercase. True or Falsearrow_forward
- а. int GreaterThan(int no) { if (no > 10) printf("%d is greater than 10", no); else printf("%d is less than 10", no); }arrow_forwardConvert feet into meters: Write a program which reads the number in feet, converts it tometers, and displays the result. One foot is 0.305 meters. One foot is 12 inches.Sample RunEnter the number of feet16.516.5 feet is 5.0325 meters16.5 feet is 198.0 inchesarrow_forwardIn this assignment you will use the MyString class that you wrote earlier in this course. A palindrome is a string that reads the same forward and backward. Write a program that reads in any number of MyStrings from the user and determines if each MyString is a palindrome. The user will terminate each MyString by pressing the return (or enter) button. The user will indicate that there are no more MyStrings by entering "quit". To do this you must write a recursive function named isAPalindrome that takes a single MyString argument and two arguments that are bounds on MyString indices. The function must examine the part of the argument between the two bounds (including the bounds) and return true if this part of the argument is a palindrome, false if it is not a palindrome. The function must be recursive and must not call any other functions except ispunct(), isspace(), and toupper() (described below). Do not make any changes to the MyString class (except, if necessary, to correct errors…arrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,