Lamb表达式匿名类实现接口方法 import java.util.ArrayList; public class HandlerDemo{ public static void main(String[] args) { ArrayList<Object> list = new ArrayList<>(); // 测试匿名类实现doBusy方法 new HandlerDemo().testHandler(() -> { list.add("测试匿名类实现doBus…
函数式接口详细定义 package java.lang; import java.lang.annotation.*; /** * An informative annotation type used to indicate that an interface * type declaration is intended to be a <i>functional interface</i> as * defined by the Java Language Specificat…
1. linq查询数据 WebTestDBEntities db = new WebTestDBEntities(); 1.1 linq查询所有列数据 var userInfoList = from u in db.UserInfo select u; 1.2 linq查询部分列数据 var userInfoList = from u in db.UserInfo select new { Name = u.UserName, Pwd = u.UserPass }; foreach (var u…