An understanding of inheritance
Flash, the fifth week of study and quietly died. Looking back at this week's Java learning, I think it was the most rewarding.
Harvest It! A lot. The fifth chapter of inheritance tells a lot of the concepts I have made clear. So I do not enumerate the knowledge points I understand. Then say I do not understand the point: abstract class, the teacher explained in class, but I still do not understand, vaguely. Abstract classes are specifically used to generate subclasses, and there must be an abstract method that acts as a placeholder for their specific implementations in subclasses. The definition of an abstract class is:
public abstract class Person
{
......
Public abstract String GetDescription ();(method is empty, and abstract method, do not need method body, by ";" end)
}
Abstract classes cannot be instantiated and cannot create objects, that is, objects of this class cannot be created if a class is declared abstract. It is important to note that you can define an object variable for an abstract class, but can only reference objects that are not abstract subclasses. I'm going to knock over some concrete concepts of abstract class in my blog, hoping to deepen my understanding of him. But the core of Java learning is to write their own code, so better understanding of him or later programming exercises, slowly, today write a program, tomorrow to write a program, may gradually understand him, this is my view.
This week's Java Learning summary is so, all the beginning difficult, to tell the truth, the fourth week is very desperate, because I feel that I read a book, do not understand, this week with the teacher's explanation, I think the study is OK, may really want them to say that, take this step, perhaps you can face the sea, spring flowers. So I have to work harder, the past is too late, but the future is still in my own hands, I look forward to my Java learning one day can dispel.
201671010122 2016-2017-2 "Java Programming" understanding of inheritance