Generics in Java

Veröffentlicht am: 02 December 2016
auf dem Kanal: Telusko
510,655
6.3k

Check out our courses:

Spring and Microservices Weekend Live Batch : https://bit.ly/spring-live-weekend
Coupon: TELUSKO10 (10% Discount)

Master Java Spring Development : https://bit.ly/java-spring-cloud

For More Queries WhatsApp or Call on : +919008963671

website : https://courses.telusko.com/

Instagram :   / navinreddyofficial  
Linkedin :   / navinreddy20  
TELUSKO Android App : https://bit.ly/TeluskoApp
Discord :   / discord  

In a nutshell, generics enable types (classes and interfaces) to be parameters when defining classes, interfaces and methods.
Much like the more familiar formal parameters used in method declarations, type parameters provide a way for you to re-use the same code with different inputs.
The difference is that the inputs to formal parameters are values, while the inputs to type parameters are types.

Code that uses generics has many benefits over non-generic code:
Stronger type checks at compile time.
A Java compiler applies strong type checking to generic code and issues errors if the code violates type safety.
Fixing compile-time errors is easier than fixing runtime errors, which can be difficult to find.
Elimination of casts.
Enabling programmers to implement generic algorithms.
By using generics, programmers can implement generic algorithms that work on collections of different types, can be customized, and are type safe and easier to read.

In this video we will see :
What is Generics
What is Type-safe Language
How to achieve type safety
An example or program of Generics implementation in Java

Java and Spring Framework For beginners with Spring Boot : - http://bit.ly/3LDMj8D

Java Tutorial for Beginners (2023) :- http://bit.ly/3yARVbN

Subscribe to our other channel:
Navin Reddy :    / @navinreddy  
Telusko Hindi :
   / @teluskohindi  


Auf dieser Seite können Sie das Online-Video Generics in Java mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Telusko 02 December 2016 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 510,655 Mal angesehen und es wurde von 6.3 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!