Supplier详解
源码分析:
package java.util.function;
@FunctionalInterface
public interface Supplier<T> {
T get();
}
示例:
public static void testSupplier()
{
Supplier<String> str = String::new;
String a = str.get();
String b = str.get();
System.out.println(a == b);
}
原创文章,作者:carmelaweatherly,如若转载,请注明出处:https://blog.ytso.com/243559.html