Generics in Java

preview_player
Показать описание
Check out our courses:

Coupon: TELUSKO10 (10% Discount)

Coupon: TELUSKO10 (10% Discount)

Coupon: TELUSKO20 (20% Discount)

Udemy Courses:

For More Queries WhatsApp or Call on : +919008963671

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

Subscribe to our other channel:
Telusko Hindi :
Рекомендации по теме
Комментарии
Автор

Sir in this lockdown I have learned a lot in programming just because of you. Thank you so much

arkojyotisen
Автор

7:35 mind blown; thank you for this video

crankMiHoffer
Автор

Best Java channel. Straightforward explanation, with code live demonstrated. You are sure to learn just by watching this. I learned from you in Spring Boot, REST services, and Java core APIs. Thank you so much!

queenskeleton
Автор

he explained it in very simple manner now i understand this concept hope he will upload more complex way to define generic

nasreenmohsin
Автор

Very straight-forward and easy to understand. Thanks for the content!

anthonycarella
Автор

Thank you so much! I've been looking all over the internet for this and none of them were as good and straightforward as this! Thank You SO MUCH!

willyang
Автор

This guy is awesome, he really likes teaching which is highly appreciate it.

MsElsospechoso
Автор

This is the single most important video if you want to be clear about Generics...Thank you!!

aishwaryadash
Автор

I was always confused with "? extends ..." & "? super ...." but now it is clear to me. Thanks Navin Sir.

gajeshtripathi
Автор

The beauty of java is that before solving clients problem you have to solve java problems.

abhishekedu
Автор

I knew about Telusko from its inception but never liked or followed. But after seeing this one single lecture. Hands down never judge a book by its cover

kiranvysya
Автор

in method definition of public void demo(ArrayList<? extends T> obj), you have use wildcard upper bound of T but actually It does not require because T itself is bound with Number.

farhaankazi
Автор

This really is the best video on Generics, I love it!

nicksonmakama
Автор

🎵🎵The Intro music is so melodious 🎼🎼, it feels very relaxed before starting any videos

anupamkumar
Автор

your title music is damn scary if you have seen haunted on discovery channel

divyeshkumarbalar
Автор

Now this was a good video. You didn't cut it too short and leave out some of the nuances like others do. Now i'ma go lookup that ? thing and Super.

Layarion
Автор

u have some enormous talent sir...plz continue this job..all the best

Harry-St-john
Автор

Thank you so much Bro for your explanation. Your video resolved many of my confusion that even my lecturer was not able to solve coz she did not understand my confusion. Generics is much more clear now for me.

zhongweimao
Автор

The best explanation for Generics and Collection interface and Collections classes

aminesfahani
Автор

Awesome bro... Best Video I ever saw for Generics... Thanx man.

manwithaction