Question: Write a Java public static method called method40 that receives a String (s) and an integer number (n). It returns a String. If the number

Write a Java public static method called method40 that receives a String (s) and an integer number (n). It returns a String. If the number n is bigger than or equal to the lenth of the String s, the method returns the complete String s, but converted all to upper case.

on the other hand, if n is smaller than the length of s, but is a positive number, then the method returns the complete Strings, but converted all to lower case. If n is negative, the method returns empt String ("")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!