Java 8 Interview Questions
Q- What are the new features introduced in Java 8? Q- What are the characteristics of Java 8 lambda expressions? Q- Why lambda expression is to be sed? Q- What kind of variable you can access in the lambda expression? Q- What are the method references? Q- What are functional interfaces? Q- Explain the purpose of all different types of functional interfaces? Q- What are default methods? How to call them? Q- What are static default methods? Hw to call them? Q- What is Streams in Java 8? Q- What is stream pipelining in Java 8? Q- How lambda expression and functional interfaces are related? Q- Can you create your own functional interface? Q- What is Optional? Why and How can you use it? Q- What is the difference between Predicate and Function? Q- Prefer Lambdas to anonymous classes? Q- Prefer method references to lambdas? Q- Use caution when making streams parallel? Q- Prefer Collection to Stream as a return type? Q- Prefer side-effect free functions in Streams?