Advertisement



< Prev
Next >



Interface in Java





An interface is a 100% abstract class that is declared with the interface keyword. Methods of interface are implicitly abstract, hence when declaring an interface, you must not provide an implementation of any of its methods and its methods should end with a semicolon ;

interface A
{
	// Unlike regular methods, method of an interface 
	// should not be implemented within a pair of curly braces {} and,
	// method of an interface should end with a semicolon.
	void getName();  
}





Some important points about interface







Please share this article -




< Prev
Next >
< Abstract Class
Final keyword in Java >



Advertisement

Please Subscribe

Please subscribe to our social media channels for daily updates.


Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page




Advertisement

Notifications



Please check our latest addition

PYTHON and DJANGO


Advertisement