title: "If" Unexpected token. What's Wrong?
body: <p>I've just started learning how to code using the Android Studio (the latest one), and I found an example program in the Net, but when I've pasted my code it underlines the 'if' statement as the "Unexpected token". Here's the screenshot and the code itself. What's wrong?</p>
  
  <p>P.S. I am using Windows 10 (if that matters)</p>
  
  <p><a href="https://i.stack.imgur.com/iQvAF.png" rel="nofollow noreferrer">Here's the screenshot :)</a></p>
  
  <pre><code>public class cls {
      int a = 4;
      boolean b = a == 4;
      if (b) {
          System.out.println("It's true!");
      }
  </code></pre>