201671010116.2016-2017-3 "Java Programming" to learn more about Java

Source: Internet
Author: User
Tags array definition array length

Through three weeks of learning, I found the Java language to be a fascinating language. The ongoing debugging of Java programs in this week's lab class has allowed me to have a new understanding of Java. A complete program code is like a beautiful building, each line of code is a floor, each code plays a very important role. For example, the location of each code will affect the overall appearance of the program, accuracy and readability. But generally speaking, the Java language error correction is simpler than the C language, because it is not as rigid as C language, so "unreasonable", most of the time it will prompt the cause of the error and give a solution, as long as the choice of a light mouse can solve the problem, which greatly improves the time efficiency. In addition, the flexibility of Java is also reflected in the format of the array, there are: array element type + array name [] and array element type [] + arrays name, such as int[] I , Java in the array definition does not allocate memory for the group element, so [] does not specify the array length. Java creates an array object by using the new keyword, allocating space for the array, in the form of the data type of the arrays name =new array element [number of array elements], such as x=new int[100] It can declare an array and create an array space at the same time, such as int[] x=new int[100].

A constructor method is a special method: it has the same name as the class, does not contain a return value, and cannot have a return value type. Void also cannot have. How the constructor works: The construction method is automatically called at the same time that a class object is created using the new+ construction method.

Java is object-oriented Java, which is an object-oriented programming language. Like any object-oriented language, Java generations are codes organized by class. Each class can inherit only one other class at a time, so that it has not only the characteristics of other classes, but also its own characteristics.

I think the key to learning Java is to keep practicing. Learning Java every day must be guaranteed a certain amount of practice, learning programming language There is no shortcut to go. Only the daily repeated operation, often write code, we encountered problems in a certain way. Waste, learning programming language needs a relatively long period of time, can not skyrocketing rise, which requires a process, in the process of slowly accumulating experience, solid foundation. Do not think that you have written a simple small program, you think you have learned very well, this is just a little practice in your learning programming process. Do not be satisfied with the status quo, to constantly improve their knowledge system, good at summing up practical experience. To correct their learning attitude, is the initiative to learn, rather than passive! Improve self-study ability. The secret of learning programming is: programming, programming, reprogramming. Not only to practice more, but also to practice quickly.

                                                                                                                                                                                                                                     ------------Li Na

201671010116.2016-2017-3 "Java Programming" to learn more about Java

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.