Home > Java > JavaBase > body text

What does instance mean in java?

Release: 2019-12-04 16:31:47
Original
6451 people have browsed it

What does instance mean in java?

Instance refers to the object implementation based on a certain class. This process is called instantiation.

Instance generation:

1. Use the new keyword (a construction method that requires public modification. The default no-parameter construction will be overwritten and hidden. You need to pay attention when using the framework. You can also pass Control the access modifier of the constructor and implement the singleton mode - lazy man | hungry man (double check lock) | static inner class | enumeration -.)

2. The newInstance method of the Class class.

3. The newInstance method of the Constructor class

4. Clone (implementing the Cloneable interface)

Serialization and deserialization (implementing Serializable or Externalizable)

For more java knowledge, please pay attention to the java basic tutorial column.

The above is the detailed content of What does instance mean in java?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!