201671010119 2016-2017-2 "Java programming" the second week of learning experience

Source: Internet
Author: User
Tags shallow copy

This week's learning goal is to master the Java application Program architecture, Java data types and variables, input and output techniques, Java Process Control techniques (branching, looping), and the use of string and array classes. With a week of learning, there are 8 basic types of Java, such as Integer type, floating-point type, character type, and Boolean type. Through the weekend experiment work, familiar with and mastered the input and output technology, Java Process Control technology. The problem of the array class is difficult to understand, but it still has some knowledge. Operator precedence and integration can also be used skillfully, basically mastered the Java application program structure.

In the theory class, the Teacher classroom exam, in the examination process, found some problems themselves can not be solved, learning is not enough. Although I have not encountered in the course of learning to run the program before the error "editor dose not contain a main type", but through the classmate's explanation and the Teacher's supplement to know that the reason for this problem is: The main class file you have created is not placed under the compiler default access path, The workaround is to refactor the program's compilation path.

A shallow copy and a deep copy are known after class through access to information. A shallow copy is a bitwise copy of an object that creates a new object with an exact copy of the original object's property values. If the property is a base type, the copy is the value of the base type, and if the property is a memory address (reference type), the memory address is copied, so if one of the objects changes the address, it will affect the other object. A deep copy copies all attributes and copies the dynamically allocated memory that the attribute points to. A deep copy occurs when the object is copied along with the object it refers to. A deep copy is slower and more expensive than a shallow copy.

201671010119 2016-2017-2 "Java programming" the second week of learning experience

Related Article

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.