Through the third week of the object and class learning in-depth understanding of the Java programming language, in the previously learned C language, is the function as a module, but in Java is the class as a module. Class also contains instance fields and methods. The data in the object is called the instance domain, and the process of manipulating the data is called a method. A class is a conceptual model that defines all the attributes and actions required for an object, which is the actual entity and the object is the real model. The object has three main features. The object's behavior, the state of the object, and the object identity. The most common types of relationships between classes are dependency, aggregation, and inheritance. Also learn to use the predefined classes.
In OOP, to use an object, you first construct the object, initialize the state of the object, and then invoke the method in the class through the object. In Java, the object is constructed and initialized with a constructor. A constructor is a special method in a class that has the same method name as the class name. Each class can have more than one constructor. The constructor can have 0, 1, or more arguments, the constructor does not return a value, and the constructor is always called with the new operation. Mastering the role of the constructor's API can learn to use the new symbol to design and generate a class object code.
In the Friday experiment class, the teacher through a series of questions infiltrated a lot of knowledge points, his class is also in earnest to do the experiment report on the homework, learning still need to spend more time and energy to learn this course.
201671010110 2016-2017-2 "Java Programming"