Question 4 (8 points) Design an algorithm for an application-level method last that accepts a String list as an argument
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Question 4 (8 points) Design an algorithm for an application-level method last that accepts a String list as an argument
Question 4 (8 points) Design an algorithm for an application-level method last that accepts a String list as an argument and returns a String. If the list is empty, the method returns null. Otherwise, it returns the last element of the list. The signature for the method should be: String last (ListInterface<String> list)