Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. package j1.lesson02;
  2.  
  3. import java.util.stream.DoubleStream;
  4.  
  5. public class Average3 {
  6. public static void main(String[] args) {
  7. double[] ary = {5.5, 10.0, 12.1};
  8. double result = DoubleStream.of(ary).average().getAsDouble();
  9.  
  10. System.out.printf("%dつの数の平均値は%f", ary.length, result);
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement