title: Using string input as boolean
body: <pre><code>    String input = sc.nextLine();
      System.out.println(Boolean.parseBoolean(input));
  </code></pre>
  
  <p>So my inputs look like <code>1 &gt; 2</code> or <code>false || true</code>, but I'm not getting the correct values.</p>
  
  <p>But when I call:</p>
  
  <pre><code>    Boolean x = 1 &lt; 2;
      System.out.println(x);
  </code></pre>
  
  <p>I get them correct. So my question is. <em>How do I convert String input to return boolean value?</em></p>
  
  <p>So far tried:</p>
  
  <pre><code>    Boolean.parseBoolean();
      Boolean.getBoolean();
      Boolean.valueOf();
  </code></pre>
  
  <p>Thanks for your answers.</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>INPUT         -  OUTPUT
  1 &lt; 2         -  false(should be true)
  false || true -  false(should be true)
  </code></pre>