Joke Collection Website - Cold jokes - Problems of java language foundation
Problems of java language foundation
You also asked about the concept of object-oriented. You have been exposed to such concepts as overloading, covering and interface, which are all from object-oriented. Object-oriented simply means supporting the operation of classes and objects. The concept of class and object is also introduced to simplify the code, so that programmers can better organize the code. This is the most basic concept of the two object-oriented.
Let me give you a description:
A class can be said to describe a concept. The class you write yourself (that is, the program segment after the class) contains the name of your concept, its attributes and the methods that can be realized.
an object is an instantiation of a class. For example, people are a class, so you and I are the objects of instantiation of "human". We describe a person, usually his name, gender, height and weight. . . Then you and I both have these attributes. We say that people can eat and walk, so this is the method in the category of "people". You and I also have these methods.
let's talk about inheritance: let's take this example. Man is an animal. Animals have attributes, such as sex and weight, and methods, such as birth and death. Then these attributes and methods are available to people, and they are also available to cats. Therefore, we can define "animal" as the parent class, and "human" and "cat" as two subclasses. Among them, "human" has special attributes and methods, such as "occupation" and "arithmetic calculation". And "cats" can "catch mice". So people and cats are all inherited from "animals", and they have all the attributes and methods of "animals", as well as other unique attributes and methods.
- Previous article:Bile connotation joke enzyme?
- Next article:Xiaogang's character setting
- Related articles
- I am 28 years old. How do I press my legs and split my legs? What is the simplest and fastest way?
- Military training instructors use Kun as a negative textbook. What's going on here?
- Terminology of deep nucleic acid network
- Customs and etiquette of countries around the world
- What's your plan to end procrastination?
- A pockmarked joke
- Is Du Fu really waiting for a letter from Li Bai, as the joke says?
- Would you like to be with someone who has suffered from depression? Why?
- Kneel for "Cat and Mouse Sichuan Dialect Edition"
- Introduce the segment of Water Margin in 50 words.