subject

Create a JAVA program (name your Java file as Lab2Vowels) with the following method: public static String replaceVowels(String inputString)
The method returns a new String replacing each vowel in the given String with the opposite letter. Here is how Opposite Letter works: English alphabets have 26 letters (A to Z). A is the 1st and its opposite will be 26th (i. e., Z is the first from the end). You will replace A with Z. Similarly, E is the 5th letter from the start, and it will be replaced with fifth letter from the end (i. e., V) and so on. You must not hardcode the replacement characters. Vowels may appear more than once in the same String. You should be using built-in methods of String class to find vowels and then replace them instead of using a loop. Hint: Get the appropriate index (or position) for a given vowel, then get the opposite letter using ASCII values, and then replace the vowel. Example: AAeEIooUu will return ZZvVRllFf

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 15:00
To check whether your writing is clear , you can
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
Text or graphics that print at the bottom of every page are called footings footers headers headings
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
Who introduced the concept of combining artificial and natural light in the studio
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
When a presentation is being planned, it is important to ensure that it covers all available information. appeals to the audience. uses multimedia tools. entertains the audience.
Answers: 1
You know the right answer?
Create a JAVA program (name your Java file as Lab2Vowels) with the following method: public static...
Questions
question
Chemistry, 15.07.2019 17:00
Questions on the website: 13722360