Jen Baby Java basic Notes inheritance related questions

Source: Internet
Author: User

Inheritance question:
1, create the object must be called the construction method inside the class do you know? Yes
2, the class inside can have multiple construction methods do you know? Yes
3. If there is more than one construction method inside the class, you'll call that. Do you know?
4, what is a subclass do you know?
5, the implementation of the subclass of the construction method must be called before the parent class is not a parameter construction method do you know?
6, how to call the parent class through the subclass of the construction method of a parameter?
Student S1 = new Student (2, "Zhang San");
Student s2 = new Student (2, "Zhang San");
if (S1==S2) {
System.out.println ("is an object");
}

Jen Baby Java basic Notes inheritance related questions

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.