Challenge 4: Playing With Strings

In this challenge, you will implement a method which will return the String in upper or lower case.

We'll cover the following

Problem statement

In this exercise, you have to write a method test(), that first checks the length of the String given to the method as input.

If the length of the String is an even number then return the entire String in upper case letters. On the other hand, if the length is odd, then return the entire String in lower case.

Get hands-on with 1200+ tech skills courses.