Advertisement
DulcetAirman

pyramid

Mar 17th, 2017
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.24 KB | None | 0 0
  1. import java.util.stream.IntStream;
  2.  
  3. class SomeClass {
  4.   public static void main(final String[] args) {
  5.     IntStream.range(1, 6).mapToObj(char[]::new).map(String::new)
  6.     .map(s -> s.replace('\0', '*')).forEach(System.out::println);
  7.   }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement