In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
What's the difference between + + and + + a? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
The difference is: the timing of self-increment of the variable "a" is different; "await +" and "+ + a" belong to the self-increment operator; "aura +" is to take the value first, and then to increment "1"; "+ a" is to increment "1" first, and then to take the value.
Both + + an and + + a belong to self-increasing operators, and the difference is that the value of variable an is self-incremented at different times. A value + is taken first, and then self-incremented. + + an is to increase itself first, and then to take a value.
Example
For example, let's assume that Xerox 3 is not the same as 4.
(1) (xylene +) + (+ + x) = 8
Explanation: for the first (x), the value obtained by (x +) is 3, and then x is self-increasing, so for the second (+ + x), because + + x is the first self-increment, the value obtained by (+ + x) is 5, and then x is 5, so the result is 8.
(2) (xylene +) / 3 + (--y) * 2-(xmai -)% 6 + (yellowing +) * 3-(ymuri -)
1'6-4'9-4'8
Explanation: first, the value of (xtrees +) is 3, then xrays 4; then (- y) is 3, at this time yellow3; then (xmuri -) is 4, then xrays 3; then (ycolors +) is 3, then ytrees 4; finally, (yrain -) takes 4, then ytrees 3.
Note: () can increase the priority of arithmetic, so the expression in parentheses is calculated first, but the value of x is x, and then x is incrementing itself.
Key point: + + operation has a high priority.
Interview questions:
Int I = 10i = iTunes +
At this point, what is the value of I?
Answer: enter a value of 10 for I
Parsing: first, the value of ifold + is 10, and then I increments itself, and at this time I increases 11, and finally assigns it, so the final output value of I is 10.
This is the answer to the question about the difference between averse + and + + a. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
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.