public interface text<T> { void eq(T column1); }
public class JgDj implements Serializable { private String createdBy; public String getCreatedBy() { return createdBy; } public static void setJgdjString(String s) { System.out.println(s); } }
public class test { public static void main(String[] args) { //这两个是相等的 text<JgDj> sl= JgDj::getCreatedBy; text<JgDj> lambdasl=(x)->x.getCreatedBy(); //这两个是相等的 text<String> jt=JgDj::setJgdjString; text<String> lambdajt=(x)->JgDj.setJgdjString(x); //通过这两个例子可以看出什么时候可以用类名加实例名,什么时候不可以用。 }