This week the teacher first helped us solve the problem left over last week. The title is as follows: If you have the following program code: string[] strs={"java", "Java", "Java", "Java", "Java"}; How many instances of String have you generated? Parse: 1 Instances of string were generated. Java virtual machines to increase efficiency and save memory, use the same instance for strings that have the same string sequence.
By combining PPT Preview textbooks, we know that the object is a concrete entity, with clearly defined state and behavior. A class is a collection of sets of objects that have the same properties and behavior. The whole fourth chapter has a general understanding of the definition and its basic usage. Immediately after the teacher to the fourth Palm object and class through the way of practice exercises focused on the explanation. The teacher described the file into streaming files and database files, streaming files can be divided into data files and text files. Then the teacher described the user-defined class, and I know that both private and public are permission modifiers. By learning to know the difference between the method and the instance domain flag is: public String getName (). and know that GetName () is an accessor method, and SetName (String name) is the change method.
In the Friday experiment class, the teacher continued to ask questions in the classroom. Through these topics, not only have a deeper understanding of the knowledge they have mastered, but also to their own shortcomings in learning to make an important supplement. ① static methods can access static domains in their own classes. The ② constructor name should be the same as the class name, and there is no return value type. ③ a non-static method of a class can access static member variables. ④ static methods of a class do not have access to the non-static member variables of the class. A static domain in the ⑤ class can be accessed either by an object name or by a class name. ⑥this. Represents a reference property, this () represents a reference constructor.
201671010119 2016-2017-2 "Java Programming" third Week learning experience