基础类型
Number
int x = 1;
int hex = 0xDEADBEEF;
double y = 1.1;
double exponents = 1.42e5;double a = 1;
int b = 1.1; // ERROR: A value of type 'double' can't be assigned to a variable of type 'int'.
b = a; // ERROR: A value of type 'double' can't be assigned to a variable of type 'int'.
a = b; // ERROR: A value of type 'int' can't be assigned to a variable of type 'double'.
num c = 1;
c = 1.5;String
方法
用途
Boolean
Last updated