### Question:
StreamApi { public static String getLastElementUsingSkip(List<String> valueList) { long count = (long) valueList.size(); Stream<String> stream = valueList.stream(); return stream.skip(count - 1).findFirst().orElse(null); }  static String getLastElementUsingReduce(List<String> valueList); static Integer getInfiniteStreamLastElementUsingReduce(); static String getLastElementUsingSkip(List<String> valueList);  }### Answer:
@Test public void givenListAndCount_whenGetLastElementUsingSkip_thenReturnLastElement() { List<String> valueList = new ArrayList<>(); valueList.add("Joe"); valueList.add("John"); valueList.add("Sean"); String last = StreamApi.getLastElementUsingSkip(valueList); assertEquals("Sean", last); }