Difference between revisions of "Optional Assignment"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
{{JavaToImplement|Max|max|optional.assignment}} | {{JavaToImplement|Max|max|optional.assignment}} | ||
− | <nowiki>public static Optional<Integer> maximum(ImmutableList<Integer> xs)</nowiki> | + | <nowiki>public static Optional<Integer> maximum(ImmutableList<Integer> xs)</nowiki> |
=Test= | =Test= | ||
{{TestSuite|MaxTestSuite|optional.assignment}} | {{TestSuite|MaxTestSuite|optional.assignment}} |
Revision as of 08:27, 30 July 2019
Note this studio is required. It helps us gain experience using java.util.Optional<T>.
Code To Implement
Max
class: | Max.java | |
methods: | max | |
package: | optional.assignment | |
source folder: | src/main/java |
public static Optional<Integer> maximum(ImmutableList<Integer> xs)
Test
class: | MaxTestSuite.java | |
package: | optional.assignment | |
source folder: | src/test/java |