Thinking in Java 16/3/5

Source: Internet
Author: User
Tags export class

interfaces : Functions of classes

Light LT = New Light ();

Lt.on ();

Hidden : How a class member/interface function exists (in the way it is used)

Public

Private

Protected

The difference between reuse and inheritance

multiplexing : Automotive Containment Engine (A contains B)

inheritance : Cats are animals (base class and export Class)

Extends and coverage (overriding) concept

extends inheritance : Add function (original function automatically exists)

overrding: Rewrite, different functions of the same interface

Thinking: The difference between exporting classes with or without overrides

A. A circle is a geometric shape (subclass)

B. e-books like paper books (instead)

Thinking: When there are two classes that intersect, is it necessary to inherit or completely replace, to generate a new class

////////////////////////////////////////////////////////

differences between Java and C + + :

single-Root inheritance : Are all classes inherited from a single base class?

objects can only be created in one way :(on the heap) new dynamically created

Containers: Containers that store objects (objects are references)

Concurrent Programming : Perform a task at the same time

Multi-Threading and locking

lock : Avoid problems with shared resources (two threads trigger printer at the same time)

Java concurrency is placed in the language

Thinking in Java 16/3/5

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.