JDK Interview Questions

What is the full form of JDK?

The full form of JDK is Java Development Kit.

Learn in Detail

Define JDK.

JDK is a superset of JRE and it contains everything that is in the JRE as well as tools such as the compilers and debuggers necessary for developing applets and applications.

What is the meaning of an OpenJDK?

OpenJDK is an open-source implementation of the Java SE 7 JSR (JSR 336). There is almost no difference between the Oracle JDK and the OpenJDK. Last year, Oracle took this decision of moving to OpenJDK as the official Java SE 7 Reference Implementation.

What is the difference between the source code found in the OpenJDK repository and the code one uses to build the Oracle JDK?
  • It is very close - our build process for Oracle JDK releases builds on OpenJDK 7 by adding just a couple of pieces, like the deployment code, which includes Oracle's implementation of the Java Plugin and Java WebStart, as well as some closed source third party components like a graphics rasterizer.

  • It also includes some open source third party components, like Rhino, and a few bits and pieces here and there, like additional documentation or third party fonts.

  • Moving forward, our intent is open source for all pieces of the Oracle JDK except those that we consider commercial features such as JRockit Mission Control (not yet available in Oracle JDK), and replace encumbered third party components with open source alternatives to achieve closer parity between the code bases.

What is the difference between a JDK and a JVM?

JDK is Java Development Kit which is for development purpose and it includes execution environment also.

But JVM is purely a run time environment and hence you will not be able to compile your source files using a JVM.

Explain what is JDK.
  • Java Development Kit (JDK): Java Development Kit is the core component of Java Environment and provides all the tools, executables and binaries required to compile, debug and execute a Java Program.

  • JDK is a platform specific software where we have separate installers for Windows, Mac and Unix systems.

  • We can say that JDK is superset of JRE since it contains JRE with Java compiler, debugger and core classes.

  • Current version of JDK is 1.7 also known as Java 7.

Define JDK, JRE and JVM.
  • JDK is for development purpose whereas JRE is for running the java programs.

  • JDK and JRE both contains JVM so that we can run our java program.

  • JVM is the heart of java programming language and provides platform independence.