Generics in Java

Pubblicato il: 27 settembre 2021
sul canale di: Academy of Fine Learning
69
4

JDK 5.0 introduced Java Generics with the aim of reducing bugs and adding an extra layer of abstraction over types.
It would be nice if we could write a single sort method that could sort the elements in an Integer array, a String array, or an array of any type that supports ordering.

Java Generic methods and generic classes enable programmers to specify, with a single method declaration, a set of related methods, or with a single class declaration, a set of related types, respectively.

Generics also provide compile-time type safety that allows programmers to catch invalid types at compile time.

0:00 Intro
1:50 Example program 1
9:23 Passing multiple types
12:26 User defined generic functions
15:29 User defined generic classes
15:35 Exceptions and Generics
23:28 Typecasting and Generics


In questa pagina del sito puoi guardare il video online Generics in Java della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Academy of Fine Learning 27 settembre 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 69 volte e gli è piaciuto 4 spettatori. Buona visione!