+ 5

what is the difference between extend and extends?

6th Nov 2017, 5:52 AM
Hasnat Azam Pallab
Hasnat Azam Pallab - avatar
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.
6th Nov 2017, 5:58 AM
Shamima Yasmin
Shamima Yasmin - avatar
+ 8
Extend is an invalid word in Java, no way extend is found in a Java code
6th Nov 2017, 5:59 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 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
6th Nov 2017, 11:03 PM
Jonathan Álex
Jonathan Álex - avatar