Oc-runtime restudying

Source: Internet
Author: User

Each Java application has a runtime class instance that enables the application to connect to the environment in which it is running. The current runtime can be obtained through the GetRuntime method, and the application cannot create an instance of the runtime class itself. Runtime does not have a construction method that indicates that the object cannot be created. When this class does not have a constructor and has a non-static method, it shows that the class has at least one static method and returns the object of that class. Runtime provides a static method of acquiring objects, and this method uses the design pattern of a singleton model to ensure uniqueness.

Interview question and Answer: Q: Have you ever used a single case? Where have you seen or used a single case? A: Runtime is an example of a single case.

The biggest advantage of runtime: The amount of data that can be obtained with memory. Some applications can get the memory of the virtual machine.

  • Introduction to Runtime
Runtime is the run time. OC is a runtime mechanism, the most important of which is the message mechanism. For the C language, at compile time, it determines which function is called. In other words, when compiling, the C language calls the non-implemented function to error. For OC, it is a dynamic call process, and at compile time it is not possible to decide which function to call. The function of the method is obtained only when it is actually running, based on the function name. It is also said that, at compile time, OC can call any method, even if the function is not implemented, as long as the declaration is possible.

Oc-runtime restudying

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.