These are chat archives for Javaliant/AdventLearning

22nd
Jun 2014
Luigi Vincent
@Javaliant
Jun 22 2014 15:42
This message was deleted
@unluckyaura013 this is the site. Here's a sample problem: Given a string, return a new string where the last 3 chars are now in upper case. If the string has less than 3 chars, uppercase whatever is there. Note that str.toUpperCase() returns the uppercase version of a string.
public String endUp(String str) {
  if (str.length() < 4) return str.toUpperCase();
  return str.substring(0, str.length()  -  3)  +  str.substring(str.length()  -  3).toUpperCase();
}
My solution.