super() in Java

前端 未结 15 2057
逝去的感伤
逝去的感伤 2020-11-22 05:36

Is super() used to call the parent constructor? Please explain super().

15条回答
  •  别那么骄傲
    2020-11-22 06:12

    For example, in selenium automation, you have a PageObject which can use its parent's constructor like this:

    public class DeveloperSteps extends ScenarioSteps {
    
    public DeveloperSteps(Pages pages) {
        super(pages);
    }........
    

提交回复
热议问题