code: public static <T> T last(Iterable<T> objects) {
          T answer = null;
          if (objects != null) {
              for (T object : objects) {
                  answer = object;
              }
          }
          return answer;
      }
docs: Returns the last item in the given collection