Interview Q&A / Java

INTERVIEW Q&A · 72 QUESTIONS

Java interview questions

Collections, the JVM, strings, exceptions and threads, the backbone of most campus placement rounds.

  1. What is a lambda expression in Java and where can you use it?

    A lambda is a short anonymous function written as (parameters) -> body. It can be used wherever a functional interface, an interface with exactly one abstract method, is expected, such as Runnable, Comparator or Predicate.

    BeginnerQuick answer1 min read