void () { Stream<String> stream = Stream.of("x"); switch (new Random().nextInt(10)) { case 0: Iterator<String> iterator = stream.iterator(); break; case 1: Spliterator<String> spliterator = stream.spliterator(); } }