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 happens if you call run() instead of start() on a Java thread?

    start() creates a new thread of execution and calls run() on it. Calling run() directly is an ordinary method call on the current thread, so no concurrency happens. Calling start() twice throws IllegalThreadStateException.

    BeginnerQuick answer1 min read