1. What is Object-oriented
(1) Object-oriented is a programming method
(2) Object-oriented is a way of thinking
(3) Object-oriented is not a programming language
2. Object-oriented benefits
3. How to learn to face the image
(1) Mastering an object-oriented language grammar
(2) Mastering object-oriented thinking mode
(3) familiar with object-oriented design principles
(4) Mastering object-oriented design patterns
4. Object-Oriented thinking methods
(1) First determine who to do, followed by determine how to do
(2) First consider the whole, then consider the local
(3) First consider the abstract, then consider the specific
5. What is a class
A class is a blueprint or prototype that defines variables and methods for all objects of the same class
6. How to create a class
Class name
{
attribute;//member variable, mainly used to describe the state of a class
method;//is also called a member method, mainly used to describe the behavior of a class
}
Such as:
Class Dog
{
String name;//Property
int age;//Property
String color;//Property
Method
void Jump ()
{
}
void Brak ()
{
}
}
7. What is the image of
A fact that exists in kind, such as a dog, a computer, a tree ...
8. How to create an object
Methods for generating objects
Format: Class Name Object name = new class name ()
Dog dog = new Dog ();
public class Test
{
public static void Main (String [] args)
{
Scanner input = new Scanner ();//Create and declare a Sanneer object
}
}
The Java language's object-oriented concepts and basic knowledge of classes and objects