java assignment operator

Note: When the assignment operator will automatically shift in the type of data

example

public  class Test {
     public  static  void main (String [] args) {
         byte NUM =. 5 ;
         // byte mathematical operation num = num + 10 => byte = byte + int => Automatic lifting => byte = int + int = > = byte (byte) 15 
        NUM = + 10 ; 
        System.out.println (NUM); // 15 
    } 
}

python without defining data types, this feeling relatively slow

Guess you like

Origin www.cnblogs.com/wt7018/p/12153632.html