Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

constructor of class that extends another class

public class Car extends Vehicle {
    private String brand = null;

    public Car(String br, String no) {
        super(no);
        this.brand = br;
    }
}
Source by tutorials.jenkov.com #
 
PREVIOUS NEXT
Tagged: #constructor #class #extends #class
ADD COMMENT
Topic
Name
2+5 =