Merge pull request #5899 from rockoder/java11-single-source

[BAEL-2357] Java 11 Single File Source Code
This commit is contained in:
Eric Martin 2018-12-13 20:46:39 -06:00 committed by GitHub
commit bf3aa03a9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
#!/usr/local/bin/java --source 11
import java.util.Arrays;
public class Addition
{
public static void main(String[] args) {
System.out.println(Arrays.stream(args)
.mapToInt(Integer::parseInt)
.sum());
}
}