+ 5
what is the difference between extend and extends?
3 ответов
+ 13
The keyword "extends" is used when a class inherits properties from another class.
class Cat extends Animal{
//
}
"extend" is not a Java keyword, as far as I know.
+ 8
Extend is an invalid word in Java, no way extend is found in a Java code
+ 3
Extend does not belong to Java.
Extends represents the inheritation keyword. When a class inherits attributes and methods from another class, you write:
class AClass extends AnotherClass
We also call "AClass" subclass, and "AnotherClass" super class, as the subclass always inherits properties from a super class