Summary of behavior of JAVA objects

Source: Internet
Author: User

Reprint: http://www.cnblogs.com/hellokitty1/p/4386719.html

Behavior of the object

1. Breakpoint Debugging
A: Positioning (setting breakpoints)
B: Start debugging
C: Stepping through the observation variable (F5 stepping F6 Single Step)
D: Modify
2 static Statics

Static members, which are shared in static methods for all objects of a class, can only call static members directly, cannot call non-static members directly in member methods, and call static and non-static members directly
Call to static Member: Class name call
3 method overloads:
There are two and more than two method names in a class with different parameter lists (parameter type parameter number)
4 Constructors: Initialization of objects
Feature: The name of the constructor must be the same as the class name; no return value no return type
By default, there is a non-parametric construction method in the class
When we write a parametric constructor, the system default parameterless constructor is no longer generated. If......we need .....
5 using this in the constructor
Calling other constructors in the constructor
This (); (The This statement must be the first sentence of this constructor)

Summary of behavior of JAVA objects

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.