Generics in Java

Telusko
Telusko
504.2 هزار بار بازدید - 8 سال پیش - Check out our courses:Spring and
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 : Instagram: navinreddyofficial
Linkedin : LinkedIn: navinreddy20
TELUSKO Android App : https://bit.ly/TeluskoApp
Discord : 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
8 سال پیش در تاریخ 1395/09/12 منتشر شده است.
504,233 بـار بازدید شده
... بیشتر