Click here to watch in Youtube :
https://www.youtube.com/watch?v=5XdsKN6e6Wg&list=UUhwKlOVR041tngjerWxVccw
Click the below Image to Enlarge
Java Tutorial : Java Anonymous inner class(Using class) |
Java Tutorial : Java Anonymous inner class(Using class) |
Java Tutorial : Java Anonymous inner class(Using class) |
abstract class Person { abstract void walk(); }
public class Student { public static void main(String args[]) { Person personRef = new Person() { void walk() { System.out.println("Walking fast"); } }; personRef.walk(); } }
Walking fast
https://sites.google.com/site/javaee4321/java/NestedClassDemo-Anonymous%20inner%20class-App.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava/NestedClassDemo-Anonymous%20inner%20class-App
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/d3069ae3fffccb0c6ba4336662b6a2619d880c61/BasicJava/NestedClassDemo-Anonymous%20inner%20class-App/?at=master
See also:
No comments:
Post a Comment