title: Can do multiple statements with stream.mapToObj
body: <p>Is it possible to do multiple statements in <code>mapToObj</code> method? . Let say I want to convert a String of characters to a String of binary using the below code:</p>
  
  <pre><code> String str = "hello";
   String bin = str.chars()
                    .mapToObj(x-&gt; Integer.toBinaryString(x))
                    .collect(Collectors.joining(" "));
  </code></pre>
  
  <p>But, I want to handle the leading zeros using something like</p>
  
  <pre><code>String.format("%8s", x).replaceAll(" ", "0")
  </code></pre>
  
  <p>So, how to add it in <code>mapToObj</code> method. I am very new to Java 8 features. Any help would be appreciated </p>