zoukankan      html  css  js  c++  java
  • 开发项目是Integer 与int 什么时候用

    什么时候用Integer :

    如果该属性所对应的数据库的字段是主键或者是外键时,用Integer;因为Integer的默认值为null,数据库的主键或者外键不能为空,但是可以为null

    什么时候用int :

    如果表示数量用int,因为int的默认值为0,它不能为null或者空

  • 相关阅读:
    2-5
    2-4 及 1、2两章 学习心得 和问题
    2-3
    4-8
    4-6
    4-5
    4-4
    4-3
    4-2
    4-1
  • 原文地址:https://www.cnblogs.com/chengxuy/p/6491055.html
Copyright © 2011-2022 走看看