In Java, what parent classes can a type have? An interface can inherit several interfaces

CSDN Q & A 2022-02-13 08:29:00 阅读数:337

java parent classes type interface


Take the answer :

Object Class is the parent of all classes , A class can inherit a parent class , Or implement multiple interfaces .

Other answers 2:

Inheritance is single inheritance, and interfaces are multiple implementations. Think about it

Other answers 3:

A class can only inherit one parent class , An interface can inherit multiple interfaces

Other answers 4:

A class can only inherit one parent class Implement multiple interfaces Interfaces can inherit multiple interfaces

copyright:author[CSDN Q & A],Please bring the original link to reprint, thank you.