Java Generics complete tutorial | What is the use of generics in Java | how to use java generics

Published: 24 May 2021
on channel: Bytecode Velocity
2,672
42

Let's Build a Community of Programmers.
Subscribe Here👉 : https://goo.gl/HhwC5i​
****************************************************************************************
The Java Generics allows us to create a single class, interface, and method that can be used with different types of data (objects). This helps us to reuse our code. Note: Generics does not work with primitive types ( int , float , char , etc).

What is the use of generics in Java?
Java Generics helps the programmer to reuse the code for whatever type he/she wishes. For instance, a programmer writes a generic method for sorting an array of objects. Generics allow the programmer to use the same method for Integer arrays, Double arrays, and even String arrays.

****************************************************************************************
#java


On this page of the site you can watch the video online Java Generics complete tutorial | What is the use of generics in Java | how to use java generics with a duration of hours minute second in good quality, which was uploaded by the user Bytecode Velocity 24 May 2021, share the link with friends and acquaintances, this video has already been watched 2,672 times on youtube and it was liked by 42 viewers. Enjoy your viewing!