Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
q4: Write a public static method named q4 that takes a String as a parameter and returns * an int. The return value is
" q4: Write a public static method named q4 that takes a String as a parameter and returns * an int. The return value is the length of the input String after removing each instance of "z", "", and "k". * Hint: If the second argument of the replace method is * removed (Replaced with nothing) the matching characters will be * See (https://docs.oracle.com/Javase/8/docs/api/java/lang/String.html#method.summary) for a complete list of methods contained in the String class. You may call any of these methods in your method q5: Write a public static method named q5 that takes a String as a parameter and returns a String. To compute the return String, first convert the input String to all upper case letters then replace all instances of the character "N" with the character "C" See (https://docs.oracle.com/javase/8/docs/api/java/lang/Strine htm
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started