First, let's say: overloading (overloading)(1) method overloading is a means of allowing classes to handle different types of data in a uniform manner. Multiple functions with the same name exist at the same time, with different number/types of
Overloading (overloading)(1) method overloading is a means of allowing classes to handle different types of data in a uniform manner. Multiple functions with the same name exist at the same time, with different number/types of parameters.Overloaded
Object-oriented third day, object-oriented
1: Review
1: this keyword
1: this indicates the reference of the current object.
2: this accesses the member variables and member methods in this class. You can also access the constructor method, which
Classes and objectsClass: A class is an abstraction of an object, which means that the class is the generic name of the same class of objects that have the same properties and methods.Object : Object is a specific thing , Java as an object-oriented
1. Definition of functionin the classof havingSpecific featuresAn independent small program, also called method.Format of the function1: Modifier Returns a value type function name (parameter type parameter 1, parameter type parameter 2)
First, let's say: overloading (overloading)(1) method overloading is a means of allowing classes to handle different types of data in a uniform manner. Multiple functions with the same name exist at the same time, with different number/types of
1. Object-orientedObject oriented is an emerging program design method, or a new program design specification (paradigm). The basic idea is to use the basic concepts of object, class, inheritance, encapsulation, polymorphism and so on to design the
When writing a program, we often encounter two modules with similar functions. One is to process int data, the other is to process string data, or other custom data types, however, there is no way to write multiple methods to process each data type,
Preface this is my Java notes, the module will be in succession, the specific link is as follows: 1. Object-oriented: Http://www.cnblogs.com/Gabby/p/6857406.html 2. Set: 3.io:4. Multithreading: 5.jvm:6. Other knowledge Knowledge Points:
1. ConstructorsA constructor is the initialization method of a class-creation object. Its name is the same as the class name. Assuming that no constructor is written, the virtual machine automatically adds a constructor with no parameters, and if
The visitor pattern is the behavior pattern of the object. The purpose of the visitor pattern is to encapsulate some operations that are applied to a data structure element. Once these operations need to be modified, the data structure that accepts
Constructors
A constructor is the initialization method of a class-creation object. Its name is the same as the class name. Assuming that no constructor is written, the virtual machine automatically adds a constructor with no parameters, and if
1. A class is the basic constituent unit of a Java program, defines the properties and methods of an object, and is a collection of objects that have common properties and behaviors.2. Nature of the object: attribute + behavior.3. The basic
PrefaceYesterday, the beginning of the "5 Questions a day interview" This kind of article, feel good, and some of the usual seemingly understood things, to figure out. Just like what is a virtual machine? This problem, it seems to know, but to tell
What is a construction method?The construction method is called when the new object is created. Each class has a constructor method, and if the programmer does not provide a constructor for the class, the Java compiler creates a default constructor
Vamei Source: Http://www.cnblogs.com/vamei Welcome reprint, Please also keep this statement. Thank you!As we mentioned in the previous article, objects in Java are initialized (initialization) when they are created. When initialized, the data member
What is the Java reflection mechanism反射机制是在运行状态中,可以知道任何一个类的属性和方法,并且调用类的属性和方法;What the reflection mechanism can do1, Judge the class of the running object2. Construct an object of any class3. Get the properties and methods of any class4. Call any
1. Constructors
Because an object constructor that creates a class is automatically executed, it is very good to initialize something
2. Method overloading
Method names are the same, parameter lists are different.
2.1
Java Se:java Me and Java EE Foundation, allowing the development and deployment of Java programs for use in desktops, servers, embedded environments and real-time environments, supporting Java Web Services development classesJava EE: is currently
First, let's say: overloading (overloading)(1) method overloading is a means of allowing classes to handle different types of data in a uniform manner. Multiple functions with the same name exist at the same time, with different number/types of
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.