Question: Some samples for testing instance methods: - The String class has an instance method toUppercase ( ) that returns a copy of the String with
Some samples for testing instance methods: The String class has an instance method toUppercase that returns a copy of the String with all characters converted to uppercase. Test that it works correctly on the string "bANana!". The String class has an instance method length that returns the length of a String. Test that it works correctly on a string of length The String class has an instance method boolean equalsIgnoreCaseString s that compares a String to another, returning true iff they are identical ignoring case Test this method comparing the strings "bANana!" and "Banana!". To better implement the above recall that if s is a String then slength is the length of s This is also true for constant strings. So "Banana".length would return
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
