selenium heirarchy code example
Example: selenium hierarchy
package SpecialConcepts;
class SuperClass1 {
public void super_print() {
System.out.println("Super Print");
}
public void super_show() {
System.out.println("Super Show");
}
}
public class SubClass1 extends SuperClass1 {
public void sub_print() {
System.out.println("Sub Print");
}
public void sub_show() {
System.out.println("Sub Show");
}
public static void main(String[] args) {
SuperClass1 superClass1 = new SubClass1();
superClass1.super_print();
superClass1.super_show();
SubClass1 subClass1 = (SubClass1)superClass1;
subClass1.sub_print();
subClass1.sub_show();
}
}