Java code. Looking for a simple solution to learn from. I\'m looking for method
ID: 3710531 • Letter: J
Question
Java code. Looking for a simple solution to learn from.
I'm looking for method that uses Stack to convert the passed string (case insensitive) to uppercase form. For example:
"Wooorrrrrllld" without quotes, it should return "WO3R5L3D".
"Maaaaaanny" without qutes, it should return "MA6N2Y"
If it's only one character, do not return the number 1 next to it.
For a starting method please use "public static String myFunction(String myString)".
myString is a String that is passed in.
The return should return the string with the number of occurences as the examples above.
However, if the string passed in is null or empty, it should return null.
Explanation / Answer
Hi Dear,
Please find my implementation.
Output:
WO3R5L3D
MA6N2Y
Process finished with exit code 0
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.