Junior Java Developer Interview Questions

Bayram EKER
3 min readJan 31, 2023

In this article we will answer JUNIOR JAVA DEVELOPER job interview questions.

Entry-Level Java Developers

As an entry-level Java developer, you will likely enter the profession with limited professional experience. Naturally, you will spend your time:

  • Developing your Java programming skills
  • Writing basic code
  • Fixing basic bugs
  • Performing testing
  • Helping your team plan Java projects
  • Creating end-user documentation that helps users navigate the system

We will answer:

  • What questions come up in a java developer job interview?
  • What should a java developer know ?
  • What are the critical questions in a job interview ?

Q-1 : What is JVM(Java Virtual Machine) ?

Answer

A Java virtual machine (JVM) is a process virtual machine that can execute Java bytecode. Each Java source file is compiled into a bytecode file, which is executed by the JVM.

Q-2 : Why is Java called the “Platform Independent Programming Language”?

Answer

Java was designed to allow application programs to be built that could be run on any platform, without having to be rewritten or recompiled by the programmer for each separate platform. A Java virtual machine makes this possible, because it is aware of the specific instruction lengths and other particularities of the underlying hardware platform.

Q-3 : What is the Difference between JDK and JRE?

Answer

  • The Java Runtime Environment (JRE) is basically the Java Virtual Machine (JVM) where your Java programs are being executed. It also includes browser plugins for applet execution.
  • The Java Development Kit (JDK) is the full featured Software Development Kit for Java, including the JRE, the compilers and tools (like JavaDoc, and Java Debugger), in order for a user to develop, compile and execute Java applications.

Q-4 : What does System.gc() and Runtime.gc() methods do?

Answer

These methods can be used as a hint to the JVM, in order to start a garbage collection. However, this it is up to the Java Virtual Machine (JVM) to start the garbage collection immediately or later in time.

Q-5 : What is JDBC?

Answer

JDBC is an abstraction layer that allows users to choose between databases. JDBC enables developers to write database applications in Java, without having to concern themselves with the underlying details of a particular database.

Q-6 : What is reflection and why is it useful?

Answer

The name reflection is used to describe code which is able to inspect other code in the same system (or itself) and to make modifications at runtime.

For example, say you have an object of an unknown type in Java, and you would like to call a ‘doSomething’ method on it if one exists. Java’s static typing system isn’t really designed to support this unless the object conforms to a known interface, but using reflection, your code can look at the object and find out if it has a method called ‘doSomething’ and then call it if you want to.

Method method = foo.getClass().getMethod("doSomething", null);
method.invoke(foo, null);

Q-7 : What is the function of CI (Continuous Integration) server?

Answer

CI server function is to continuously integrate all changes being made and committed to repository by different developers and check for compile errors. It needs to build code several times a day, preferably after every commit so it can detect which commit made the breakage if the breakage happens.

Q-8 : What is the relationship between a class and an object?

Answer

A class acts as a blue-print that defines the properties, states, and behaviors that are common to a number of objects. An object is an instance of the class. For example, you have a class called Vehicle and Car is the object of that class. You can create any number of objects for the class named Vehicle, such as Van, Truck, and Auto.

The new operator is used to create an object of a class. When an object of a class is instantiated, the system allocates memory for every data member that is present in the class.

I hope the article was helpful. Don’t forget to follow to read our latest articles.

--

--