Which of the following functional interfaces in Java utilizes Lambda expressions?
- AbstractClass
- FunctionalInterface
- Runnable
- Serializable
The Runnable interface in Java can be implemented using lambda expressions. It's a functional interface with a single abstract method run(). This allows you to use lambda expressions for tasks that can be executed concurrently. Lambda expressions simplify the creation of anonymous classes for such tasks.
Loading...
Related Quiz
- Which arithmetic operator is used to perform exponentiation in Java?
- In a multi-threaded environment, which class (StringBuffer or StringBuilder) would you primarily use and why?
- In a scenario where you need to manage a large number of database connections, how would you optimize and manage database connectivity to ensure minimal resource usage and maximum performance?
- To specify a repeating behavior in an animation, ______ method is used in JavaFX.
- Which class would you use for reading binary data from a file?