Java interview questions (Basic)

1. Tell me about your knowledge of Java.

Java is a high-level programming language, which operates on a variety of platforms, including Windows, Mac OS, and different UNIX versions.

2. What do you mean when you say “platform independence”?

Platform independence means that we may create and build the java code on one platform (for example, Windows) and run the class on any other supported platform (for example, Linux).

3. What exactly is a JVM?

JVM stands for Java Virtual Machine, and it is a run-time framework for compiled java class libraries.

4. How many different sorts of memory locations does JVM allocate?

There are several types:

  • Area of Classification
  • Heap
  • Stack
  • Program Counter Register
  • Native Method Stack

5. What exactly is a constructor?

In Java, a constructor is a specific sort of method that is used to initialize the object. It is known as a constructor because it builds a value for the object.

Aside from that, here are some more topics that are usually asked in an interview:

  • Interface Design Patterns in Java
  • The difference between various collections
  • Memory management in Java
  • Java Development
  • Thread Specification
  • Marker Connections
  • Generics