Skip to content

Commit bf3aa03

Browse files
authored
Merge pull request eugenp#5899 from rockoder/java11-single-source
[BAEL-2357] Java 11 Single File Source Code
2 parents ed1edc9 + 98d74af commit bf3aa03

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • core-java-11/src/main/java/com/baeldung
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/local/bin/java --source 11
2+
3+
import java.util.Arrays;
4+
5+
public class Addition
6+
{
7+
public static void main(String[] args) {
8+
System.out.println(Arrays.stream(args)
9+
.mapToInt(Integer::parseInt)
10+
.sum());
11+
}
12+
}

0 commit comments

Comments
 (0)