官术网_书友最值得收藏!

Data types

Data is categorized into types. A data type identifies not only the form of the data but also what kind of operations can be performed upon it. For example, arithmetic operations can be performed on numerical data, but not on text data.

A data type can also determine how much computer storage space an item requires. For example, a decimal value like 3.14 would normally be stored in a 32-bit (four bytes) slot, while a web address such as https://google.com might occupy 160 bits.

Here is a categorization of the main data types that we will be working with in this book. The corresponding Java types are shown in parentheses:

  • Numeric types
    • Integer (int)
    • Decimal (double)
  • Text type
    • String (String)
  • Object types
    • Date (java.util.Date)
    • File (java.io.File)
    • General object (Object)
主站蜘蛛池模板: 保德县| 林甸县| 永清县| 南京市| 江津市| 周口市| 南溪县| 闽侯县| 灵璧县| 夏河县| 阜康市| 海丰县| 岢岚县| 台前县| 海城市| 大姚县| 枝江市| 天镇县| 荔波县| 弥勒县| 灵寿县| 冷水江市| 景洪市| 巩留县| 西充县| 云林县| 孙吴县| 镇远县| 永年县| 昌黎县| 宁陕县| 乌拉特后旗| 乐山市| 贵定县| 荥经县| 兴山县| 盱眙县| 剑阁县| 舒兰市| 沧州市| 襄垣县|