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
On this page of the site you can watch the video online Generics in Java with a duration of hours minute second in good quality, which was uploaded by the user Telusko 02 December 2016, share the link with friends and acquaintances, this video has already been watched 510,655 times on youtube and it was liked by 6.3 thousand viewers. Enjoy your viewing!