|
Java example source code file (MethodReference40.java)
The MethodReference40.java Java example source code/* * @test /nodynamiccopyright/ * @bug 8003280 * @summary Add lambda tests * check that unbound constructor reference are not accepted * @compile/fail/ref=MethodReference40.out -XDrawDiagnostics MethodReference40.java */ class MethodReference40 { static class Sup { class Inner { Inner(String val) { } } } static class Sub extends Sup { interface SAM { Sup.Inner m(Sub x, String str); } void test() { SAM var = Sub.Inner::new; } } } Other Java examples (source code examples)Here is a short list of links related to this Java MethodReference40.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.