Java Operadores Prioridade de Operadores Pré/Pos Incremento/Decremento

Java Operadores Prioridade de Operadores Pré/Pos Incremento/Decremento. Linguagem Java.
Quais são os Operadores em java?
Source: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/opsummary.html

Simple Assignment Operator

= Simple assignment operator

Arithmetic Operators

+ Additive operator (also used for String concatenation)
– Subtraction operator
* Multiplication operator
/ Division operator
% Remainder operator

Unary Operators

+ Unary plus operator; indicates positive value (numbers are positive without this, however)
– Unary minus operator; negates an expression
++ Increment operator; increments a value by 1
– Decrement operator; decrements a value by 1
! Logical compliment operator; inverts the value of a boolean

Equality and Relational Operators

== Equal to
!= Not equal to
> Greater than
>= Greater than or equal to
Conditional Operators

Condition Operators

&& Conditional-AND
|| Conditional-OR
?: Ternary (shorthand for if-then-else statement)

Type Comparison Operator

<p>
  instanceof Compares an object to a specified type
</p>

<p>
  </font><font style="font-weight: bold; color: rgb(0, 0, 0);" size="3" face="arial">Bitwise and Bit Shift Operators</font><font style="color: rgb(0, 0, 0);" size="3" face="arial"></p> 

  <p>
    ~ Unary bitwise complement<br />> Signed right shift<br />>>> Unsigned right shift<br />& Bitwise AND<br />^ Bitwise exclusive OR<br />| Bitwise inclusive OR
  </p>

  <p>
    </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><font style="font-weight: bold;">Precedência de Operadores em java:</font><br />Source: <a rel="nofollow" target="_blank" href="http://www.uni-bonn.de/~manfear/javaoperators.php">http://www.uni-bonn.de/~manfear/javaoperators.php</a></p> 

    <p>
      </font>
    </p>

    <table face="arial" style="color: rgb(0, 0, 0); width: 610px; height: 33px;" border="1" cellpadding="4" cellspacing="0">
      <tr valign="top">
        <td width="25%">
          <p align="center">
            <font size="3"><strong>Prioridade</strong></font>
          </p>
        </td>

        <td width="42%">
          <p align="center">
            <font size="3"><strong>Operador</strong></font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3"><strong>Operação</strong></font>
          </p>
        </td>
      </tr>
    </table>

    <table face="arial" style="color: rgb(0, 0, 0); width: 609px; height: 1135px;" border="1" cellpadding="4" cellspacing="0">
      <col width="64"> <col width="107"> <col width="85"> <tr valign="top">
        <td rowspan="3" width="25%">
          <p align="center">
            <font size="3"><strong><br />1</strong></font>
          </p>
        </td>

        <td width="42%">
          <p align="center">
            <font size="3">[ ]</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">array index</font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td width="42%">
          <p align="center">
            <font size="3">( )</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">method call</font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td width="42%">
          <p align="center">
            <font size="3">.</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">member access &#8211; 1<br /></font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td rowspan="7" width="25%">
          <p align="center">
            <font size="3"><strong><br />2</strong></font>
          </p>
        </td>

        <td width="42%">
          <p align="center">
            <font size="3">++</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">pre- or postfix increment</font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td width="42%">
          <p align="center">
            <font size="3">&ndash;</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">pre- or postfix decrement</font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td width="42%">
          <p align="center">
            <font size="3">+ &#8211;</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">unary plus, minus</font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td width="42%">
          <p align="center">
            <font size="3">~</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">bitwise NOT</font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td width="42%">
          <p align="center">
            <font size="3">!</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">boolean (logical) NOT</font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td width="42%">
          <p align="center">
            <font size="3">(type)</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">type cast</font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td width="42%">
          <p align="center">
            <font size="3">new</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">object creation &#8211; 2<br /></font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td sdval="3" sdnum="1033;" width="25%">
          <p align="center">
            <font size="3"><strong>3</strong></font>
          </p>
        </td>

        <td width="42%">
          <p align="center">
            <font size="3">* / %</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">multiplication, division, remainder</font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td rowspan="2" sdval="4" sdnum="1033;" width="25%">
          <p align="center">
            <font size="3"><strong>4</strong></font>
          </p>
        </td>

        <td width="42%">
          <p align="center">
            <font size="3">+ &#8211;</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">addition, substraction</font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td width="42%">
          <p align="center">
            <font size="3">+</font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">string concatenation -4<br /></font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td rowspan="3" width="25%">
          <p align="center">
            <font size="3"><strong><br />5</strong></font>
          </p>
        </td>

        <td width="42%">
          <p align="center">
            <font size="3"></font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">signed bit shift left</font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td width="42%">
          <p align="center">
            <font size="3">>></font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">signed bit shift right</font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td width="42%">
          <p align="center">
            <font size="3">>>></font>
          </p>
        </td>

        <td width="33%">
          <p align="center">
            <font size="3">unsigned bit shift right &#8211; 5<br /></font>
          </p>
        </td>
      </tr>

      <tr valign="top">
        <td rowspan="3" width="25%">
          <p align="center">
            <font size="3"><strong></p> 

            <p>
              6</strong></font>
            </p></td> 

            <td width="42%">
              <p align="center">
                <font size="3"></font>
              </p>
            </td>

            <td width="33%">
              <p align="center">
                <font size="3">less than, less than or equal to</font>
              </p>
            </td></tr> 

            <tr valign="top">
              <td width="42%">
                <p align="center">
                  <font size="3">> >=</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">greater than, greater than or equal to</font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td width="42%">
                <p align="center">
                  <font size="3">instanceof</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">reference test &#8211; 6<br /></font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td rowspan="2" sdval="7" sdnum="1033;" width="25%">
                <p align="center">
                  <font size="3"><strong>7</strong></font>
                </p>
              </td>

              <td width="42%">
                <p align="center">
                  <font size="3">==</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">equal to</font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td width="42%">
                <p align="center">
                  <font size="3">!=</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">not equal to</font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td rowspan="2" sdval="8" sdnum="1033;" width="25%">
                <p align="center">
                  <font size="3"><strong>8</strong></font>
                </p>
              </td>

              <td width="42%">
                <p align="center">
                  <font size="3">&</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">bitwise AND</font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td width="42%">
                <p align="center">
                  <font size="3">&</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">boolean (logical) AND</font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td rowspan="2" sdval="9" sdnum="1033;" width="25%">
                <p align="center">
                  <font size="3"><strong>9</strong></font>
                </p>
              </td>

              <td width="42%">
                <p align="center">
                  <font size="3">^</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">bitwise XOR</font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td width="42%">
                <p align="center">
                  <font size="3">^</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">boolean (logical) XOR</font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td rowspan="2" sdval="10" sdnum="1033;" width="25%">
                <p align="center">
                  <font size="3"><strong>10</strong></font>
                </p>
              </td>

              <td width="42%">
                <p align="center">
                  <font size="3">|</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">bitwise OR</font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td width="42%">
                <p align="center">
                  <font size="3">|</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">boolean (logical) OR</font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td sdval="11" sdnum="1033;" width="25%">
                <p align="center">
                  <font size="3"><strong>11</strong></font>
                </p>
              </td>

              <td width="42%">
                <p align="center">
                  <font size="3">&&</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">boolean (logical) AND</font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td sdval="12" sdnum="1033;" width="25%">
                <p align="center">
                  <font size="3"><strong>12</strong></font>
                </p>
              </td>

              <td width="42%">
                <p align="center">
                  <font size="3">||</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">boolean (logical) OR</font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td sdval="13" sdnum="1033;" width="25%">
                <p align="center">
                  <font size="3"><strong>13</strong></font>
                </p>
              </td>

              <td width="42%">
                <p align="center">
                  <font size="3">? :</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">conditional &#8211; 13<br /></font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td rowspan="2" width="25%">
                <p align="center">
                  <font size="3"><strong><br />14</strong></font>
                </p>
              </td>

              <td width="42%">
                <p align="center">
                  <font size="3">=</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">assignment</font>
                </p>
              </td>
            </tr>

            <tr valign="top">
              <td width="42%">
                <p align="center">
                  <font size="3">*= /= += -= %= </font>
                </p>

                <p align="center">
                  <font size="3"><br /></font>
                </p>

                <p align="center">
                  <font size="3">>= >>>= </font>
                </p>

                <p align="center">
                  <font size="3"><br /></font>
                </p>

                <p align="center">
                  <font size="3">&= ^= |=</font>
                </p>
              </td>

              <td width="33%">
                <p align="center">
                  <font size="3">combinated assignment </font>
                </p>

                <p align="center">
                  <font size="3"><br /></font>
                </p>

                <p align="center">
                  <font size="3">(operation and assignment)</font>
                </p>
              </td>
            </tr></tbody> </table> 

            <p>
              <font style="color: rgb(0, 0, 0);" size="3" face="arial"></p> 

              <p>
                </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"></p> 

                <p>
                  <font size="4"><font style="font-weight: bold;">Oque tudo isso significa?</font></font>
                </p>

                <h2>
                  Java Operadores Prioridade de Operadores Pré/Pos Incremento/Decremento
                </h2>

                <p>
                  Que a precedência de Operadores é IMPORTANTE, pois dependendo muda o resultado.
                </p>

                <p>
                  int c = 25 &#8211; 5 * 4 / 2 &#8211; 10 + 4; c aqui recebe 34
                </p>

                <p>
                  int c = 25 &#8211; ((5 * 4) /2)) &#8211; 10 + 4; c aqui recebe 9
                </p>

                <p>
                  <font style="font-weight: bold;">Quero abrir um espaço para falando Somente sobre o Operador de Incremento e Decremento(++ e &ndash;):</font><br />&#8211; Quando estão sozinhos, eles são a mesma coisa que acrescentar 1 Porem:
                </p>

                <p>
                  <font style="font-weight: bold;">Pré Incremento:</font> Incrementa quando aparece o operador<br /><font style="font-weight: bold;">Pós Incremento:</font> Incrementa somente na Instrução de baixo
                </p>

                <p>
                  <font style="font-weight: bold;">Pré Decremento:</font> Decrementa quando aparece o operador<br /><font style="font-weight: bold;">Pós Decremento: </font>Decrementa somente na Instrução de baixo
                </p>

                <p>
                  <font style="font-weight: bold;" size="4">Exemplo:</font>
                </p>

                <p>
                  int b = 2;<br />++b; // Pré Incremento , <font style="font-weight: bold;">b = 3</font>
                </p>

                <p>
                  int b = 2;<br />b++; //Pos Incremento, <font style="font-weight: bold;">b = 2</font><br />int a = b; //<font style="font-weight: bold;">Aqui o b vale 3</font>
                </p>

                <p>
                  <font style="font-style: italic;">Mesma coisa com Decremento.</font>
                </p>

                <p>
                  <font style="font-weight: bold;" size="4">AGORA QUANDO ELE são usados com algum Operador, a coisa muda.</font>
                </p>

                <p>
                  int b = 2;<br />int c = ++b;// <font style="font-weight: bold;">b = 3, c = 3.</font>
                </p>

                <p>
                  int b = 2;<br />int c = b++;//<font style="font-weight: bold;"> c = 2, b =3(Somente na proxima Instrução)</font><br />Proxima Instrução
                </p>

                <p>
                  <font style="font-weight: bold;">Explicando oque aconteceu:</font>
                </p>

                <p>
                  Em:
                </p>

                <p>
                  int b = 2;<br />int c = ++b;
                </p>

                <p>
                  Temos em bytecode:
                </p>

                <p>
                  0: iconst_2<br />1: istore_1<br />2: iinc 1, 1<br />5: iload_1<br />6: istore_2<br /><font style="font-weight: bold;">*As explicações estão no tutorial: Básico sobre bytecodes</font>
                </p>

                <p>
                  Suponto que estamos usando o método main, veremos oque ocorre no Frame, Lembre-se que o index 0 da local variable é uma Referência a Constant Pool
                </p>

                <p>
                  <font style="font-weight: bold;">0: iconst_2</font>:<br /></font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_CdmD2AaXIBs/Sp7pT4JwE9I/AAAAAAAAAKs/Wvk3_OkiCw0/s1600-h/OperandoStackLocalVariable1.png"><img style="cursor: pointer; width: 244px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable1-1.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376991532827022290" border="0" /></a><br /><font style="font-weight: bold;">Clique na imagem para ampliar</font><br /></font><font style="color: rgb(0, 0, 0);" size="3" face="arial"></p> 

                  <p>
                    <font style="font-weight: bold;">1: istore_1</font>
                  </p>

                  <p>
                    </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CdmD2AaXIBs/Sp7pRcQT5HI/AAAAAAAAAKk/218gOVFU0KA/s1600-h/OperandoStackLocalVariable2.png"><img style="cursor: pointer; width: 264px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable2-1.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376991490978604146" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><font style="font-weight: bold;">Clique na imagem para ampliar</font></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br /><font style="font-weight: bold;">2: iinc 1, 1</font></p> 

                    <p>
                      </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_CdmD2AaXIBs/Sp7pOjs43eI/AAAAAAAAAKc/KyJFytg_WvQ/s1600-h/OperandoStackLocalVariable3.png"><img style="cursor: pointer; width: 264px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable3-1.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376991441437908450" border="0" /></a></font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br /></font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><font style="font-weight: bold;">Clique na imagem para ampliar</font></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br /><font style="font-weight: bold;">5: iload_1</font></p> 

                      <p>
                        </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_CdmD2AaXIBs/Sp7pMLz66YI/AAAAAAAAAKU/vKaHT__i1Bk/s1600-h/OperandoStackLocalVariable4.png"><img style="cursor: pointer; width: 264px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable4-1.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376991400665213314" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><font style="font-weight: bold;">Clique na imagem para ampliar</font></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br /><font style="font-weight: bold;">6: istore_2</font></p> 

                        <p>
                          </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_CdmD2AaXIBs/Sp7pJePFjjI/AAAAAAAAAKM/PH_FaoUqOPI/s1600-h/OperandoStackLocalVariable5.png"><img style="cursor: pointer; width: 262px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable5-1.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376991354071387698" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><font style="font-weight: bold;">Clique na imagem para ampliar</font></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br />Sendo b index 1 da Local Variable, c index 2 da Local Variable, temos b e c com o valor de 3.</p> 

                          <p>
                            <font size="4"><font style="font-weight: bold;">Veremos o próximo:</font></font>
                          </p>

                          <p>
                            int b = 2;<br />int c = b++;
                          </p>

                          <p>
                            <font style="font-weight: bold;">Temos em Bytecode:</font>
                          </p>

                          <p>
                            0: iconst_2<br />1: istore_1<br />2: iload_1<br />3: iinc 1, 1<br />6: istore_2<br /><font style="font-weight: bold;">0: iconst_2:</font><br /></font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CdmD2AaXIBs/Sp7o2_rtagI/AAAAAAAAAJc/zTzleUYmGLM/s1600-h/OperandoStackLocalVariable11.png"><img style="cursor: pointer; width: 244px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable11-1.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376991036632295938" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"></p> 

                            <p>
                              <font style="font-weight: bold;">1: istore_1</font>
                            </p>

                            <p>
                              </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_CdmD2AaXIBs/Sp7oz0uMiGI/AAAAAAAAAJU/7aGaRIWnAHM/s1600-h/OperandoStackLocalVariable12.png"><img style="cursor: pointer; width: 264px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable12.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376990982150326370" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br /><font style="font-weight: bold;">2: iload_1</font><br /></font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_CdmD2AaXIBs/Sp7otsEF_5I/AAAAAAAAAJE/QPhYHFpnnHo/s1600-h/OperandoStackLocalVariable13.png"><img style="cursor: pointer; width: 264px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable13.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376990876747038610" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br /><font style="font-weight: bold;">3: iinc 1, 1</font></p> 

                              <p>
                                </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_CdmD2AaXIBs/Sp7oqSdlwQI/AAAAAAAAAI8/rjYBJVvXCoY/s1600-h/OperandoStackLocalVariable14.png"><img style="cursor: pointer; width: 264px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable14.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376990818335047938" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br /><font style="font-weight: bold;">6: istore_2</font></p> 

                                <p>
                                  </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_CdmD2AaXIBs/Sp7o6bIZG4I/AAAAAAAAAJk/5W3wqsZUYss/s1600-h/OperandoStackLocalVariable10.png"><img style="cursor: pointer; width: 262px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable10-1.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376991095539964802" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br />Sendo b index 1 da Local Variable, c index 2 da Local Variable, temos b = 3 e c com o valor de 2.</p> 

                                  <p>
                                    <font style="font-weight: bold;">E se tivermos mais de um operador Unário?</font>
                                  </p>

                                  <p>
                                    int b = 3;<br />int c = b++ + 1;
                                  </p>

                                  <p>
                                    <font style="font-weight: bold;">Vamos em ordem de Precedência de Operadores:</font><br />1 &#8211; Primeiro Operador de Pos Incremento:<br />c = 3 + 1 = 4;<br />b = 4;
                                  </p>

                                  <p>
                                    <font style="font-weight: bold;">Outro Exemplo:</font>
                                  </p>

                                  <p>
                                    int b = 2;<br />int c = b++ + ++b;<br /><font style="font-weight: bold;">Vamos em ordem de Precedência de Operadores:</font>
                                  </p>

                                  <p>
                                    <font style="font-weight: bold;">1 &#8211; Primeiro Operador de Pos Incremento:</font><br />int c = 2 + ++b; -> Aqui quando ele carrega o b, ele ja tem o valor de 3<br />pois ja é a próxima instrução<br />b = 3;(na Próxima instrução)
                                  </p>

                                  <p>
                                    <font style="font-weight: bold;">2 &#8211; Primeiro Operador de Pos Incremento:</font><br />int c = 2 + 4 = 6<br />b = 4;
                                  </p>

                                  <p>
                                    <font style="font-weight: bold;">Em bytecode Temos: Sendo b index 1, c index 2 da Local Variable</font>
                                  </p>

                                  <p>
                                    Code:<br />0: iconst_2<br />1: istore_1<br />2: iload_1<br />3: iinc 1, 1<br />6: iinc 1, 1<br />9: iload_1<br />10: iadd<br />11: istore_2
                                  </p>

                                  <p>
                                    <font style="font-weight: bold;">0: iconst_2</font>
                                  </p>

                                  <p>
                                    </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_CdmD2AaXIBs/Sp7pGui3cEI/AAAAAAAAAKE/9S-IouwE-XA/s1600-h/OperandoStackLocalVariable6.png"><img style="cursor: pointer; width: 244px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable6-1.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376991306909708354" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br /><font style="font-weight: bold;">1: istore_1</font></p> 

                                    <p>
                                      </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CdmD2AaXIBs/Sp7pDd9DPwI/AAAAAAAAAJ8/4r5_zHPXotg/s1600-h/OperandoStackLocalVariable7.png"><img style="cursor: pointer; width: 264px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable7-1.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376991250916523778" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><font style="font-weight: bold;">2: iload_1</font></p> 

                                      <p>
                                        </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_CdmD2AaXIBs/Sp7pAuf0LRI/AAAAAAAAAJ0/icgOW7YrQ7o/s1600-h/OperandoStackLocalVariable8.png"><img style="cursor: pointer; width: 264px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable8-1.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376991203817696530" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br /><font style="font-weight: bold;">3: iinc 1, 1</font></p> 

                                        <p>
                                          </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CdmD2AaXIBs/Sp7o9dJrrAI/AAAAAAAAAJs/y_TR9M4iQME/s1600-h/OperandoStackLocalVariable9.png"><img style="cursor: pointer; width: 264px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable9-1.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376991147621854210" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br /><font style="font-weight: bold;">6: iinc 1, 1</font><br /></font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_CdmD2AaXIBs/Sp7onGudmPI/AAAAAAAAAI0/ZeMENSxwbZo/s1600-h/OperandoStackLocalVariable15.png"><img style="cursor: pointer; width: 264px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable15.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376990763644983538" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br /><font style="font-weight: bold;">9: iload_1</font><br /></font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CdmD2AaXIBs/Sp7ojtbK8AI/AAAAAAAAAIs/YG6di4eNGZ4/s1600-h/OperandoStackLocalVariable16.png"><img style="cursor: pointer; width: 262px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable16.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376990705313574914" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"><br /><font style="font-weight: bold;">10: iadd</font><br /></font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CdmD2AaXIBs/Sp7ogOI02PI/AAAAAAAAAIk/eQRgPxCBYwY/s1600-h/OperandoStackLocalVariable17.png"><img style="cursor: pointer; width: 262px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable17.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376990645375523058" border="0" /></a></font><br /><font style="color: rgb(0, 0, 0);" size="3" face="arial"></p> 

                                          <p>
                                            <font style="font-weight: bold;">11: istore_2</font><br /></font><font style="color: rgb(0, 0, 0);" size="3" face="arial"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_CdmD2AaXIBs/Sp7ob6adCCI/AAAAAAAAAIc/4bYVhFmjB0Q/s1600-h/OperandoStackLocalVariable18.png"><img style="cursor: pointer; width: 262px; height: 122px;" src="http://localhost/www/wp0/uploads/OperandoStackLocalVariable18.png" alt="Exemplos Java,Linguagem Java, Programação, Java" id="BLOGGER_PHOTO_ID_5376990571361273890" border="0" /></a></font>
                                          </p>

                                          <p>
                                            <span style="font-weight: bold; font-family: arial; color: rgb(0, 0, 0);">Curiosidade:</span><br style="font-family: arial; color: rgb(0, 0, 0);" /><span style="font-family: arial; color: rgb(0, 0, 0);"> O Operador<span style="font-weight: bold;"> %</span> remain é chamado <span style="font-weight: bold;">MOD</span>.</span><br style="font-family: arial; color: rgb(0, 0, 0);" /><br style="font-family: arial; color: rgb(0, 0, 0);" /><span style="font-family: arial; color: rgb(0, 0, 0);">Exemplo:</span><br style="font-family: arial; color: rgb(0, 0, 0);" /><span style="font-family: arial; color: rgb(0, 0, 0);">2 % 2 = 0 pois a conta é exata</span><br style="font-family: arial; color: rgb(0, 0, 0);" /><span style="font-family: arial; color: rgb(0, 0, 0);">3 % 2 = 1 pois para a conta dar certa so posso ir ate o 2</span><br style="font-family: arial; color: rgb(0, 0, 0);" /><span style="font-family: arial; color: rgb(0, 0, 0);">1 % 2 = 1 quando é menor é sempre ele mesmo</span>
                                          </p>

                                          <p>
                                            <font style="color: rgb(0, 0, 0);" size="3" face="arial"><br />Bom basicamente era essa a intenção, Próximo Post, cast,Promoção em tipos primitivos.<br /><font style="font-weight: bold;">Cya DUDES!</font></p> 

                                            <p>
                                              </font><font style="color: rgb(0, 0, 0);" size="3" face="arial"></font>
                                            </p>