package Interface; interface Eatable { void eat(); } class TestAnnonymousInner1 { public static void main(String args[]) { /* Eatable e = new Eatable() { public void eat() { System.out.println("nice fruits"); } }; e.eat(); */ new Eatable() { public void eat() { System.out.println("nice fruits"); } }.eat(); } }
Wednesday, August 17, 2016
Java anonymous inner class example using interface
Subscribe to:
Post Comments (Atom)
php4
<?php // Start the session session_start(); ?> <!DOCTYPE html> <html> <head> <link rel=&q...
No comments:
Post a Comment