Interview Questions and Answers
Intermediate / 1 to 5 years experienced level questions & answers
Ques 1. What is lambda expression?
Thread thread = new Thread(new Runnable() { public void run() { System.out.println("Hello World!"); }});Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 2. Given a list of employees, sort all the employee on the basis of age by using java 8 APIs only.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 3. Given the list of employees, find the employee with name 'John' using Java 8 API.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 4. Given a list of employee, find maximum age of employee using Java 8 API.
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 5. Provide some examples of Intermediate operations.
- filter(Predicate)
- map(Function)
- flatmap(Function)
- sorted(Comparator)
- distinct()
- limit(long n)
- skip(long n)
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Ques 6. Provide some examples of Terminal operations.
- forEach
- toArray
- reduce
- collect
- min
- max
- count
- anyMatch
- allMatch
- noneMatch
- findFirst
- findAny
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Most helpful rated by users:
- What are new features which got introduced in Java 8?
- What are main advantages of using Java 8?
- Can you explain the syntax of Lambda expression?
- What are functional interfaces?
- What Is a Default Method and When Do We Use It?