Java Method Reference

Regarding all zip files for download.

  • All downloadable zip files contains a Netbeans IDE project with code examples.
  • Needed tools for all examples can be found in the right menu on this page.
Static-Method Reference Download
A method reference to a static method of a class, an interface, or an enum, Here is an example. StaticMethodRef.zip
Instance-Method Reference Download
The object reference on which an instance method is invoked is known as the receiver of the method invocation. This example shows a Bound receiver type. InstanceBoundMethodRef.zip
Instance-Method Reference Download
The object reference on which an instance method is invoked is known as the receiver of the method invocation. This example shows a UnBound receiver type.
Instance-Method super Reference Download
The keyword super is used as a qualifier to invoke the overridden method in a class or an interface. Here is an example of how to do that, MethodSuperRef.zip
Instance-Method new Reference Download
Constructor references are just like method references, except that the name of the method is new. Here is an example of how to do that, MethodNewRef.zip

© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.