Java Fundamentals (ii)

Source: Internet
Author: User

Connect to the Java Foundation (i)

Outline: (1) advanced features of the class

(2) Collection class

(3) Exception handling

(4) Input/output

(5) Swing program Design

Abstract class: Only declares the existence of a method and does not implement its class; An abstract class cannot be instantiated, that is, it cannot create its object;

The syntax format is as follows:

Abstract class class Name {    class body}

In the abstract class, there is no practical meaning, the method that must be overridden in the subclass is an abstract method, and the abstract method has only the method declaration and no method implementation;

The basic definition format is as follows:

Abstract < return value > method name (Parameter list)

PS: Abstract methods cannot be modified with private and static

Inner class:

If a class is declared inside a class as an inner class, the inner class can be divided into members inner class, local inner class, Anonymous inner class

 Public class outerclass{    publicclass  innerclass    {...    }}

The member variables and member methods of external classes can be used arbitrarily in inner classes, although they are declared private; an instance of an inner class must be bound to an instance of an external class.

Java Fundamentals (ii)

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.