Java Explicit Type casting

36 Views Asked by At

class Test 
{
    public static void main(String[] args) 
    {
      
      int i = 135;
      byte b = (byte)i;
      System.out.println(b);
    }
}


output: -121 my question is how compiler is doing the round off what formula it is following internally?

0

There are 0 best solutions below