title: Use of =+ operator in Java?
body: <p>I've the following code:</p>
  
  <pre><code>public class Operators {
      public static void main(String[] args) {
          int i =+ 2;
          System.out.println(i);
      }
  }
  </code></pre>
  
  <p>Upon executing I'm getting the following output: <strong>2</strong></p>
  
  <p>So what does <strong><code>=+</code></strong> operator actually does here?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>As some answered, it is assigning <code>+2</code> to <code>i</code>, consider the following code:</p>
  
  <pre><code>public class Operators {
      public static void main(String[] args) {
          int i =- -2;
          System.out.println(i);
      }
  }
  </code></pre>
  
  <p>So in above case, output should be <strong><code>-2</code></strong>. But I'm getting <strong><code>2</code></strong></p>
  
  <p>So I suppose, it is <code>-(-2)</code>, which gives <code>2</code>. <em>Right</em>?</p>