An essay on Crazy Java

Source: Internet
Author: User

Chapter I. Java Overview

1.java does not allow executable statements, methods and other components to exist independently, all programs must be placed in the class definition.

The parameter of the 2.main method must be a string array (string[] args is a string array form), so the method of main is almost fixed.

3. The source code has a public class, and the primary file name must be the same as the public name.

4.java heap Memory is a runtime data area that holds the instance (object), and the Java Virtual machine's heap memory holds all the objects that are created by the running application. When an object is no longer referenced, the memory reclaims the space he occupies, and also the memory record fragment. One potential drawback of garbage collection is that its overhead affects performance. The Java virtual machine must keep track of the objects that are useful in the program in order to determine which objects are useless objects and eventually dispose of those useless objects. This process requires the time of the processor. Second, garbage collection algorithm is not complete. No 100% guarantees that garbage is fully recycled (finds useless objects, reclaims space occupied by useless objects).

5. The accuracy of garbage collection mainly includes two aspects: 1) garbage collection mechanism can accurately mark the Living object 2) The garbage collector can accurately locate the reference relationship between objects

The smallest unit of 6.java is a class, and the entire Java consists of a single class.

7.

An essay on Crazy Java

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.