In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
one。 Data types in Java
The variable is to request memory to store the value. That is, when you create a variable, you need to apply for space in memory.
The memory management system allocates storage space for variables according to the type of variables, and the allocated space can only be used to store that type of data. Therefore, by defining different types of variables, you can store integers, decimals, or characters in memory.
Two big data types of Java:
1. Built-in data types (basic data types)
1. Six numeric types (byte, short, int, long, float, double) + void
8 16 32 64 32 64 bit
two。 A character type char
16-bit Unicode character
3. A Boolean boolean
1 bit
two。 About Integer
For two non-new generated Integer objects, the comparison result is true if the values of the two variables are between 128and 127. if the values of the two variables are not in this interval, the comparison result is false.
Integer I = 100 false Integer j = 100 false system. Out.print (I = = j); / / System.out.print
When java compiles Integer I = 100;, it translates to Integer I = Integer.valueOf. The definition of valueOf of Integer type in java API is as follows. The number between-128and 127will be cached. When Integer I = 127, 127will be cached. The next time Integer j = 127 is written, it will be taken directly from the cache and will not be new.
Public static Integer valueOf (int I) {assert IntegerCache.high > = 127; if (I > = IntegerCache.low & & I
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.