当前位置:网站首页>Abstract methods and interfaces
Abstract methods and interfaces
2022-06-12 05:00:00 【なんでもないゃ】
Abstract methods are methods that have no concrete implementation , There is no method body , use abstract modification ;
An abstract class is a class that cannot be instantiated , That is, you cannot create objects ;
There can be abstract methods in an abstract class , There can also be non abstract methods , A class with abstract methods must be an abstract class ;
After an abstract class is inherited, it must override all abstract methods , The actual meaning of abstract classes is not to create objects but to be inherited , Abstract classes are mandatory and normative for subclasses ;
Interface : More abstract than abstract classes , The methods in the interface are all abstract methods , Properties are constants , use private static final modification , It can be omitted ; stay Java8 After that, static methods are supported in the interface 、 Method of default permission ,Java9 Then support private methods ;
Interface supports multiple inheritance , Classes can only be inherited singly , Class can implement multiple interfaces , Interface makes up for the defect that a class can only inherit ;

Inner classes are divided into ordinary inner classes , Static inner class , Local inner classes , Anonymous inner class ;
边栏推荐
- [cjson] precautions for root node
- Pytorch was reported by a large number of netizens that torchrec, a new library, was "born" and has a large scale
- Force/release learning arrangement in IC Verification (5) research on the influence of reg type signals
- Memory protection
- How to deploy dolphin scheduler Apache dolphin scheduler 1.2.0 in cdh5.16.2
- The emergence of new ides and the crisis of programmers?
- Musk promotes the development of fascinating new products partners remind important questions
- Interview must ask: summary of ten classic sorting algorithms
- Fundamentals of intensive learning openai gym environment construction demo
- One dragon and one knight accompanying programmers are 36 years old
猜你喜欢

Normalized vegetation index (NDVI) data, NPP data, GPP data, evapotranspiration data, vegetation type data, ecosystem type distribution data

Ten trends of Internet Security in 2022 industry released

Why is Julia so popular?
![February 19, 2022 [Nolan] Nolan resurrected? Change · Nolan [soul orchid] can be connected to XDD / silly girl](/img/1a/ab2158a532683632f3a12fe41812f5.jpg)
February 19, 2022 [Nolan] Nolan resurrected? Change · Nolan [soul orchid] can be connected to XDD / silly girl

cellular automaton

asp. Net core theme Middleware

Interview must ask: summary of ten classic sorting algorithms

C asynchronous programming (async and await) and asynchronous method synchronous invocation

2022 examination questions and simulation examination for crane driver (limited to bridge crane)
![[GIS tutorial] land use transfer matrix](/img/89/c5b55262e39405547c46538355e278.jpg)
[GIS tutorial] land use transfer matrix
随机推荐
22-2-28 there are many things to do at work today, ETH analysis
Sv806 QT UI development
Bearpi IOT lighting LED
Detailed tutorial on the use of yolov5 and training your own dataset with yolov5
Layer sublayer assigns values to the page elements of the parent layer to achieve the effect of transferring values to the page of the parent layer
JS set the position of the current scroll bar
Chapter 1
JS to determine whether the tags of multiple classes are empty
Summary of problems in rv1109/rv1126 product development
Can‘t find a suitable configuration file in this directory or any parent. Error reporting and resolution
CCF access control system
LabVIEW關於TDMS和Binary存儲速度
Main business objects of pupanvr record (5)
According to aiqicha, keep went public in Hong Kong and hit the "first share of online fitness"
Install pycharm under Kali and create a shortcut access
cellular automaton
Font conversion optimization
WiFi smartconfig implementation
Longest palindrome string
How to count the total length of roads in the region and draw data histogram