Generic Interface 3
public class GenericClass1 implements GenericInterface<String>{
public void add(String x) {
System.out.println("String Value :"+x);
}
public static void main(String[] args) {
GenericClass1 g1=new GenericClass1();
g1.add("hai");
}
}
Output:
String Value :hai