Source |
CodingSec |
Identifiant |
358796 |
Date de publication |
2017-04-25 16:01:37 (vue: 2017-04-25 16:01:37) |
Titre |
How to use interfaces in your java code |
Texte |
An interface is a collection of method prototypes (method name followed by parameters list without any body). The syntax of a method prototype is as follows: return-type  method-name(parameters-list); An interface can contain only constants and method prototypes. The use of an interface is to abstract the class' behavior from its definition. In this way an interface can specify a set of method prototypes which can be implemented by one or more classes. Differences between interface and a class Objects can be created for classes, where as it is not possible for interfaces. Classes can contain methods with body, where
|
Envoyé |
Oui |
Condensat |
abstract any appeared behavior between body can class classes code coding collection constants contain created definition differences first followed follows: from how implemented interface interfaces its java list method methods more name not objects one only parameters possible post prototype prototypes return security set specify syntax type use way where which without your â method |
Tags |
|
Stories |
|
Notes |
★★★
|
Move |
|