Common classes and interfaces

Source: Internet
Author: User

 

Common interfaces:

1. java. Lang. cloneable interface. You can use the object. Clone () method to copy the fields of instance objects of the class to another instance of the same class one by one.

2. Comparable interfaces for Java. Lang. comparable. The two instance objects of the class implementing this interface can be compared. Negative Numbers (-1), 0, and positive numbers (1) indicate the relationship between the compared object and the compared object, which is less than, equal to, or greater. You can sort multiple instance objects of classes that implement this interface.

3. java. Lang. iterable can be iterated. Classes that implement this interface are generally used as containers.

4. java. Lang. runnable interfaces. The instance object of the class implementing this interface will be run in a separate thread. Classes without extension threads can implement this interface to develop multi-threaded services.

Common classes:

1. The instance objects of the Java. Lang. Class class express the running classes or interfaces in the Java application. This class does not have a public constructor, so it cannot be automatically instantiated by the Java virtual machine, but by the classloader.

2. the java. Lang. classloader class is a Java class loader, which loads the corresponding class according to the specified binary name. Read the binary class "*. Class" information and generate a class object.

3. java. Lang. Integer indicates the class of the int type of the original data type.

4. the java. Lang. Math class provides basic mathematical calculation methods. For example, multiplication, square, square, exponent, and angle calculation.

5. The objects of the Java. Lang. object class are directly or indirectly extended by all other classes in the Java platform. This class provides default object operation methods.

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.