 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can implement a generic class with two type parameters in Java. Before starting, please subscribe my YouTube channel by clicking on the link which is available at the bottom right corner of this video. You can download my app Takamis that is available on Google Play. You can connect with me by following these details which are available in front of you. Now coming on to the topic. Here you can see a class is written. Name of class is GEN and it is having two type parameters T and V. So this is a generic class. That's why we are using this notation. Then OB1 and OB2. Two references are created here. One for T and one for V. Then constructor of GEN class is defined here. T, O1, V, O2. Two arguments are received here and O1 is assigned into OB1 and O2 is assigned into OB2. Then show type. Show types method is defined which is printing. OB1.getclass.getname and OB2.getclass.getname. So it will display type of T and V which is provided by the programmer while implementing object of this class. Then get OB1 method is defined which is returning values available inside OB1. Its return type is T because OB1 is of type T and get OB2 method is returning OB2. Its return type is V because OB2 belongs to V type parameter. So after implementation of this generic class, we have to implement another class in which we are going to create object. So here GEN demo class is defined which is containing main method. Inside main method, this statement is creating object of GEN class. Name of object is OBJ and you can see two type parameters, integer and string are declared here and two arguments, 88 and generics are passed here. So these two values will be received by O1 and O2. O1 will be assigned into OB1 and O2 will be assigned into OB2. And then with the help of these two system.out.println type parameters T and V type will be displayed. So show types method is called here which will display parameters type. Then get OB1 method is called which is receiving sorry which will return value which will be received by V and then it will be displayed on console. Then get OB2 method is called which will receive value and that will be received by STR and then STR will be displayed here. So friends, with the help of this simple example, you might have understood how you can create a generic class which will handle two types of parameters together two different type of parameters together. Now I am going to execute this code so that you can see the output. You can see type of T is java.lang.integer and type of V is java.lang.string and first value is 88 which is displayed through this V and second value is generics which is displayed with the help of this STR. So friends, with the help of this simple or easy example, you might have understood how you can create generic class for two type parameters. I hope you have understood the concept well. If you want to watch more programming related videos, you can follow my YouTube channel. You can subscribe my YouTube channel by clicking on the link which is available at bottom right corner. Thank you for watching this video.