In this video, syntax of replace() method and toCharArray() method is explained with the help of two programs. The application of toCharrArray() is explained with the help of toggle case program.
Link to the Book - Essentials of Computer Applications:
https://www.amazon.in/Essentials-Comp...
Link to Lesson 13: implicit and explicit conversion:
• Lesson 13 Type Conversion - Implicit, Exp...
Link to lesson 59 to understand object creation with the help of a character array.
• Lesson 59 String Handling - Part 1 - Int...
Link to lesson 61 to understand object creation with the help of a character array.
• Lesson 61 Strings - Part 3 - Password V...
Lesson 66 replace(), toCharArray()
1. Initialize a string with August 15 is an Independence Day. Change the string to January 26 is a republic day.
2. Read a string and replace all the occurrences of “ is ” with “ was ”.
3. Read a string and replace all the occurrences of ‘i’ with ‘e’.
4. Read a string from user, and convert it into a character array and display.
5. Convert the string “try” to a character array and display.
6. Guess output char b[] = “xyz”.toCharArray().