I have been thinking about a question: how to describe the computer ?????
In the past, when I was studying C language, I often talked to my classmates about this problem. Basically, there were not a few comprehensive descriptions, including myself. I first thought about it from the overall framework. The computer included displays, chassis, and mouse, keyboard, that is, the most basic attribute. It is really good to describe it like this. At least it can prove that you can grasp the whole thing. It is better than many people who say that the computer is composed of CPU, hard disk, display, and memory. Or here, let's talk about one thing.
When learning Java, I always don't know what the difference between the struct of class and C ?????
But now I will not describe the computer. In addition to the basic attributes mentioned above, the computer can also chat about QQ, watch webpages, watch movies, and other functions. From this point, we can see that the class is actually a complete (Comprehensive) Description, while the struct ignores its purpose.
Class computer
{
Monitor guanjie;
HOST: Dell;
Keyboard: shuangfeiyan;
Mouse: shuangfeiyan;
Void web ()
{
System. Out. println ("view web page ");
}
Void QQ ()
{
System. Out. println ("chat QQ ");
}
Void movie ()
{
System. Out. println ("watching movies ");
}
}
From the point of view of the computer, if you want to use a good computer, you only need to know some of its purposes. If you want to know more about the computer, it is necessary to study its basic attributes. For Java, we also regard everything as an object, that is, a class, which is composed of basic attributes and methods (usage. This is why he can describe some things in a better way, so that you can grasp some things from more perspectives.
From the above we can see that the class only adds some methods on the struct, as a whole.
So it can be concluded that in order to learn java well, the first step is to master the class. to master the class, you only need to master its methods and attributes. To grasp the methods and attributes, I personally think that I should first learn to use classes that have been written by others and know how to call class methods. To learn how to call a class quickly, you can start with the Java GUI. In fact, it is very easy to learn java. When you learn one thing, you only need to know three things:
I. Which classes are used for these knowledge points.
2. Which methods of the class should be used to implement functions.
3. Learn to read JDK, because it is a good explanation of Class and Class methods.