Qual a diferenca entre wait(), notify(), notifyAll();
 
Alguem pode me explicar :
  • << Un-signed left shift
  • >> Signed right shift
  • >>> Un-signed right shift
public class TestShift {

       public static void main(String args[]) {
               int x = 1;
               x = x >> 31;
               int y = -1;
               y = y >> 31;
               System.out.println("The ouput of x is " + x );
               System.out.println("The ouput of y is " + y );

       }
}

 

public class TestShift {

      public static void main(String args[]) {
               int x = 1;
               x = x << 31;
               int y = -1;
               y = y << 31;
               System.out.println("The output of x is " + x );
               System.out.println("The output of y is " + y );

       }
}

 

public class TestShift {

       public static void main(String args[]) {
               int x = 1;
               x = x >>> 31;
               int y = -1;
               y = y >>> 31;
               System.out.println("The output of x is " + x );
               System.out.println("The output of y is " + y );

       }
}

Responder a