Learn Java Third week summary
- Two ways to learn about input through the classroom: 1) input device 2) file a) streaming file b) data file
- The data under private is accessible only to instances within the class.
- Encapsulation provides secure access.
- Generally starting with get_ is the accessor method set_ begins with the change method.
- This week, we mainly learn the basic concepts of classes and objects: figuring out the specific entities that an object is present, and having well-defined states and behaviors. A class is a collection of sets of objects that have the same properties and behavior.
- In Java, you can customize the class, and I feel very similar to a custom function in the C language. Class is a body of classes that contains two of content (instance fields and methods).
- A constructor is required to construct a new class, the constructor is the same as the class name, the constructor does not return a value, and is always called with the new operation.
- The This keyword can reference any member of the constructor in a class.
- This week's learning is the most fundamental feature of Java, but I think I need time to solidify the foundation.
201671010130 2016-2017-2 "Java Programming" third week study summary