(Crazy Java) Lesson two

Source: Internet
Author: User

(This article is only for fun, no other meaning, there is a misunderstanding of the place, please remind, thank you)

Third, data types and operators

Think about the content today seems to be still in the brain in C to understand Java, it feels a little strange, why this chapter called data types and operators, came up to the comment, it can be seen that Li Gang is still very important to this thing, it seems to feel that who has been cruel tortured. In my opinion the code comment is like, the beautiful woman wears the bikini, the more less will be able to bear (certainly some friends endure the ability to be strong, especially few times). The general code of the comments, the purpose is to read the code of the person, can be fast asphalt more complex logic, and the purpose is for example I want to write a file, then I want to let people know I this file used to do what, there is no good place, those who can use, then I can refer to the annotation document that way. Have seen a lot of Daniel's code, above all add a lot of English, looks very good appearance, feel tall on, there are wood.

Identifiers and keywords, this thing do not know how to say, it is like, we all eat chopsticks, you use chopsticks when you shout chopsticks is a bucket, we obviously do not agree ah, you this is a provocation ah, decisive let you make mistakes, let you egg pain, the system retains the key words, the role is so. There are basic data types, this is like the Chinese radicals, how to say, do not know how to think of the original word, the key is that he really thought of, and also succeeded, the idea of the great God is I can not understand AH.

Finally, this chapter writes about the problem of conversion between relational operators and variables. Relational operators, this thing is a skilled unskilled problem, the only interest is an operator, this is thanks to see a Daniel play this, play relatively high like on. Type conversion, a bigger and smaller problem, when the system will automatically go to deal with, generally do not have any problems, when the system is also automatic processing, but it is like castration, as for the good cut, it depends on your own luck, in order to cut the better, need to be cautious ah, Or you'll fall out of the hole without realizing it.

4 flow control and arrays

Process Control and c,c++,oc,php are the same, follow. Array this thing, let's say, the index of the array is placed on the stack, the real content, is placed in the heap, what is heap and stack, plainly, the stack is the system will deal with the place, the heap is generally the programmer himself opened up and assigned. such as local variables are in the stack, the array is actually the index is usually the concept of the pointer, through this, you can play the array, which is why the array needs to be read through the xxx[] way. Each array is allocated after the same size of memory, so, the type of the array is fixed, then the dynamic allocation, xxx[5] This, is only a lie, in fact, is only assigned after the default initialization, this incredibly also called dynamic allocation. Look at OC inside Nsmutablearray that is called intelligence, but of course Java also has a similar solution, here is no longer said.

(Crazy Java) Lesson two

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.