In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Any bigger than an int can NEVER be assigned to an int or anything smaller than int (byte, char, or short) without explicit cast.
Constant values up to int can be assigned (without cast) to variables of lesser size (e.g. short to byte) if the values are representable by the variable.
Operands of mathematical operators are ALWAYS promoted to AT LEAST int. (e.g. byte*byte both bytes will be first promoted to int) and the return value will be AT LEAST int.
Compound assignment operators (+=, *= etc) have strange ways so ready this carefully: A compound assignment expression of the form E1 op = E2 is equivalent to E1 = (T)((E1) op (E2)), where T is the type of E1
A char value can ALWAYS be assigned to an int variable, since the int type is wider than the char type.
A narrowing primitive conversion may be used if all of the following conditions are satisfied:
The expression is a constant expression of type int.
The type of the variable is byte, short or char.
The value of expression is representable in the type of the variable.
NOTE THAT narrowing conversion doesn't apply to long or double. So, char ch = 30L; will fail althrough 30 is representable by a char.
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.