THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng | |
---|---|
Số trang | 748 |
Dung lượng | 37,42 MB |
Nội dung
Ngày đăng: 04/09/2018, 14:21
Nguồn tham khảo
Tài liệu tham khảo | Loại | Chi tiết |
---|---|---|
2. What is a functional interface?A functional interface is an interface that contains one and only one abstract method | Khác | |
3. How do functional interfaces and lambda expressions relate?A lambda expression provides the implementation for the abstract method defined by the functional interface. The functional interface defines the target type | Khác | |
4. What are the two general types of lambda expressions?The two types of lambda expressions are expression lambdas and block lambdas. An expression lambda specifies a single expression, whose value is returned by the lambda. A block lambda contains a block of code. Its value is specified by a return statement | Khác | |
5. Show a lambda expression that returns true if a number is between 10 and 20, inclusive | Khác | |
6. Create a functional interface that can support the lambda expression you created in question 5.Call the interface MyTest and its abstract method testing( ) | Khác | |
7. Create a block lambda that computes the factorial of an integer value. Demonstrate its use. Use NumericFunc, shown in this chapter, for the functional interface | Khác |
TỪ KHÓA LIÊN QUAN
TÀI LIỆU CÙNG NGƯỜI DÙNG
TÀI LIỆU LIÊN QUAN