Java???????????????
?????Daren Lin ???????[ 2017/6/28 10:36:58 ] ??????????????????? Java
????????
????Java????????????????4??
????1. Instance Variables: (Non-Static Fields) ???????????field
????2. Class Variables: (Static Fields) ???????field
????3. Local Variables: ???????
????4. Parameters: ????
?????????????????????field??variable??field????????1??2????class??е????????field???????variable??????????3??4???????????????variable??
????????
????Java??????????д???????????????????????java??????????????????????????????????????????????????????????????????д?????磺 speed?? currentGear
???????????????? Primitive Data Type
????Java??8??????????????
?????????? 4???? byte?? short?? int?? long
???????? 2???? float?? double
??????? 1???? char
???????? 1???? boolean
??????????????????£?
???????? Default Value
??????????г??????????????????c/c++????????????????java???????????????????????
????The eight primitive data types are: byte?? short?? int?? long?? float?? double?? boolean?? and char. The java.lang.String class represents character strings. The compiler will assign a reasonable default value for fields of the above types; for local variables?? a default value is never assigned. A literal is the source code representation of a fixed value. An array is a container object that holds a fixed number of values of a single type. The length of an array is established when the array is created. After creation?? its length is fixed.
?????????Field?????????????????????int???0??object???null????????Variable??????????????????????г????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11