Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the difference between super and extends in Java

Shulou Source: shulou.com Published: 2022-06-02 09:28:57 10月02日 Update

This article mainly explains "what is the difference between super and extends in Java". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what's the difference between super and extends in Java?"

/ / compile error

The difference between / / List and type parameters is that all T represents the same type for the compiler. For example, in the following generic method, all three T refer to the same type, either String or Integer.

Public List fill (T... T)

But wildcards don't have this constraint. Plate simply means: there's something on the plate. I don't know what it is.

So the mistake in the subject question is here, and nothing can be put into the Plate.

4.2 Lower bound

Tags: Plates fruits things wildcards apples lower bounds methods elements that is upper bounds containers types compilers compilers between examples actual content actually objects Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information vpn Linux Apple NVidia