Ans:
syntax:
interface interface name{
//declaration of methods and constants
}
class class name implements{
//implementation codes
}
- An interface is a named collection of method declarations and constant declarations.
- here we only declare the methods not a implementation.
- it's implemented by a class using implements keyword.
syntax:
interface interface name{
//declaration of methods and constants
}
class class name implements{
//implementation codes
}
No comments:
Post a Comment