 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can implement generic interfaces in Java. Before starting, you can subscribe my YouTube channel by clicking on the bottom right corner of this video. You can download my app Techimus that is available on Google Play. You can connect with me by following these details which are available in front of you. Now I am going to explain the concept of generic interface. You can see a code is available in front of you. Here interface name is minmax which is extending comparable. In this interface, two methods are declared min and max. Both have return type t. So here this minmax interface is having parameter type t which is right now not defined. Then my class is defined which is also extending comparable. And it is implementing interface minmax which is defined above this class. Then wells array of t type is created. Then this is the constructor which is receiving o as an argument and o is assigned into wells array. Then this method is defined which is min. This method is declared inside this minmax interface. Then wells 0 is assigned into v. So first element is assigned into v. Then loop is started from 1 and it will repeat till wells.length. So wells.length is providing total number of elements which are available inside array. So from 1 to that length, this array will be repeated. Then wells of i. So each value will be compared by this method compared to with v. So first time v is containing first argument. So wells of i, it is containing second argument. So second argument is compared with first. If it is less than 0, it means wells of i is less than v. So wells of i will be assigned into v. So till this condition is true, this loop will repeat. And at last, after termination of this loop, the value which is available inside v variable will be returned. Similar to min, max is defined. Here condition is changed. It is greater than 0. So if this comparison is greater than 0, then only wells of i will be assigned into v. And then value of v will be returned. So this way, max and min method are defined inside my class. But these methods are declared inside this interface minmax. Now second class is gen demo. Inside this class, main method is defined, which is containing two arrays, i nums and chs. So i nums is containing integer values and chs is containing character array or character values. Then two objects iob and cob are created. iob is having i nums as an argument and cob is containing chs as argument. So both these arguments will be passed into constructor of my class, which is implemented here. This so o is receiving those arguments, which will be assigned into wells. Then with the help of these methods, system.out.println, iob.max, iob.min are called cob.max and cob.min are called. So i have called these methods inside this println method. So that return values will be displayed here automatically. I have not used separate variables to store those return values. So now i am going to execute this code. You can see the output. Max value in nums is 8, which is true. Min value in i nums is 2, which is also true. Max value in chs is w and min is b. In this character format, this difference is made with the help of askai values. So askai value of w is highest in b, r, p and w and askai value of b is lowest in these four characters. So friends, this way i have implemented generic reference in this example. So i hope you have understood how you can implement generic interface in Java. If you want to watch more programming related videos, you can subscribe my YouTube channel. Do follow my YouTube channel. Thank you for watching this video.