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

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)
主站蜘蛛池模板: 崇文区| 饶河县| 永春县| 米泉市| 泰来县| 临澧县| 津南区| 万载县| 宁强县| 沈阳市| 繁昌县| 信丰县| 汝州市| 新野县| 云霄县| 余姚市| 绩溪县| 萍乡市| 福安市| 定安县| 利川市| 大冶市| 建湖县| 肇源县| 法库县| 马关县| 吉首市| 北流市| 乐平市| 庆城县| 怀化市| 新巴尔虎左旗| 仙桃市| 通辽市| 嘉兴市| 三台县| 兰西县| 青海省| 鄂州市| 嘉义县| 乌拉特后旗|