Skip to content

Instantly share code, notes, and snippets.

@ishankhare07
Created January 22, 2015 14:15
Show Gist options
  • Save ishankhare07/338020319e0a9a0d3cfb to your computer and use it in GitHub Desktop.
Save ishankhare07/338020319e0a9a0d3cfb to your computer and use it in GitHub Desktop.
interface implementation through a class
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