Created
January 22, 2015 14:15
-
-
Save ishankhare07/338020319e0a9a0d3cfb to your computer and use it in GitHub Desktop.
interface implementation through a class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface onClickListener { | |
public void onClick(); | |
} | |
public class Practice implements onClickListener { | |
@Override | |
public void onClick() { | |
System.out.println("this is a demo"); | |
} | |
public static void main(String[] args) { | |
Practice p = new Practice(); | |
p.onClick(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment