由于JAVA的基本类型会有默认值,例如当某个类中存在private int age;字段时,创建这个类时,age会有默认值0.当使用age属性时,它总会有值.因此在某些情况下,便无法实现age为null.并且在动态SQL的部分,如果使用age!=null进行判断,结果总会为true,因而会导致很多隐藏的问题.所以,在JAVA实体类中不要使用基本类型,基本类型包含byte.int.short.long.float.double.char.boolean.…
例如在unity c# script中定义 private float x=0.0; 则会报 error CS0664: Literal of type double cannot be implicitly converted to type `float'. Add suffix `f' to create a literal of this type 应写成 float x=0.0f;…