day03 Java Memory Architecture and overloading

Source: Internet
Author: User

function overloading (overload)
Concept:
In the same class, more than one function with the same name is allowed, as long as their number of arguments or arguments
Type can be.

Features of the function:
Regardless of the return type, only related to the parameter list,

Array
Concept:
A collection of data of the same type, in fact the array is a container.
Format:
element type [] Array name =new element type

Memory structure
Java programs need to allocate space in memory at run time. In order to improve the efficiency of the operation, there is a team space
Zoning, because each region has a specific way of handling data and memory management.

Stack Memory:
Used to store local variables, and when the variables are used up, the occupied space is automatically freed.

Heap Memory:
Arrays and objects are stored in heap memory by the instances created by new.
Each entity has a memory address value.
The variables in the entity have default initialization values.
Entities are no longer used and will be recycled--garbage--in an indeterminate time-(c + + is manually removed
Delete),

method to:

Local Method Area:

Register:

day03 Java Memory Architecture and overloading

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.