Suppose I have an interface:
interface MyInterface <T>;
then suppose I have multiple implementations
public class Imp1 implements MyInterface<Object>
public class Imp2 implements MyInterface<Object2>
Can I reuse same interface variable without specifying a type?
so say,
MyInterface var1 = new Imp1();
var1 = new Imp2();
oppose to having to do this:
MyInterface var1<?> = new Imp1();
Or must I always do that/live with that warning?
Here is what I need.
I am using selenium for test automation.
I have an interface that is a table. Which represents a html table for getting rows. Next I have type methods that return the equivalent pojo object. For example a cars table will return a cars object. One table could be used on many pages, and each different page could return a different pojo object.
switchstatement where you'll cast it to particular class).