Top 19 Core Java Interview Question for Beginners in 2020

Find here Java Interview Question for Beginners to crack the interview. If you have any question-related Core Java interviews simple comment below. Our team will reply as soon as possible about your question. you can also mail us at [email protected]

List of Top 19 Java Interview Question for Beginners.

1) What is java?

Java is a general-purpose programming language that has implemented an object-oriented programming technique well via class-based implementation.

2) What are the main features of Java?

  • Object-Oriented
  • Platform Independent
  • Architectural Neutral
  • Robust
  • Secure
  • Portable

3) What does it mean by machine-independent? or How java is platform-independent?

Java programming language works on the principle of WORA (Write once, run anywhere).
That means compiler generates the code which is not specific for any particular platform like Window, Linux, Mac, etc.

For example Developed s software on window platform, you can run it Linux, Mac, etc without changing anything in source code.

4) Is Java is Platform-neutral, if Yes, how? or How java is architecture-neutral?

The java is designed in such a way that it has the capability of executing on a variety of hardware architectures and processors.

For example Developed s software on a 32-bit platform, you can run it on a 64-bit operating system.

5) What is Bytecode?

The machine-independent code generated by the compiler that is used by the interpreter for execution.

( Related Topics: Best Institute for Java Training in Chandigarh )

6) What are the editions are available in java?

Initially, Java was developed for the network and electronics components, JDK 1.0 contains very few classes (around 300), that were manageable, But JDK 2.0 come up with a huge library that was not easily manageable in a single package.
The Java community decide to break it into platform wise and create editions.

Java widely divided into three Editions:

  • J2SE (Java 2 Platform, Standard Edition)
  • J2EE (Java 2 Platform, Enterprise Edition)
  • J2ME (Java 2 Platform, Micro Edition)

7) What is JVM?

JVM stands for Java virtual machine, It is responsible(execution engine) for converting Bytecode to platform-dependent() code and make it executable.

8) What is JRE?

JRE means Java Runtime Environment,  It provides the platform to run Java applications. On Window, it come default with the operating system.

It contains the Core class, Virtual machine, and supporting files.

JRE means Java Runtime Environment, It provides the platform to run Java applications. On Window, it come default with the operating system.

It contains the Core class, Virtual machine, and supporting files.

9) What is JDK?

JDK means Java development Kit, provides toolkit and libraries for developing Java applications.

It consists of both development kit and platform to run java application;
JDK = Development kit+JRE

10) What is JIT?

JIT stands for Just-in-time, It is a compiler that compiles the Byte code into native machine code that improves the application performance.

it comes in picture when JVM gets some repeated code in the source code.

11) What is Path(PATH) and ClassPath(CLASSPATH) in java?

Path defines the location where all the executable tools are available like Java, Javac, javaw, javap,etc. locates under bin folder ‘Java\jdk1.8.0_221\bin’

ClassPath defines the location where the application’s classes are available.

12) What are the Compilers for Java?

Mainly two compilers used by most of the company
Javac-  Provided by Oracle.
ECJ – Eclipse compiler for java.

13)  What is the GC?

GC stands for Garbage collection, It performs automatic memory management, the user only focused on object creation, not on clean up.

GC is invoked by JVM, The thread which is taking care of GC has the lowest priority.

Users can not invoke it explicitly, But he can just inform JVM to recycle garbage by using calling Runtime.gc() method.

14) What are the algorithms used by GC?

Currently, Java used four garbage collectors:
1. Serial
2. Parallel
3. Concurrent Mark Sweep
4. G1 (Garbage First)

15) is java pure oops?

Yes,  Because everything goes inside classes.
But if the question,  Really is it?

No, Pure object-oriented programing consists only classes like Smalltalk,
If I am talking about java it has something else called primitive data type which is not classes in java.

16) What are the IDEs available for Java?

Java does not provide any editor or IDE for java developments.
You can any editor for development like NotePad, NotPad++, etc.

But there are many IDE(Integrated Development Environment) available in the market and used by companies like: Eclipse, NetBeans, IntelliJ, etc.

17) What is oops? and its features?

It is a programming mechanism that is used to design requirements in such a manner to increase reusability, productivity and decrease maintenance cost of the software.

Main features of oops:

Inheritance:-

  • It is a concept by which one class acquire the properties of another class.
  • The class acquires the property is called child/drive class and Another class is called parent/superclass of that class.

Polymorphism:-

  • It is a greek word which means “Many forms”, In object-oriented programing languages reusability is a very important concept.
  • So the mechanism by which a single unit of code (like method) works in different manners is called polymorphism.

Encapsulation:- Way of binding the data and method in a single unit called Encapsulation.

Abstraction:- It provides a way to focus on functionality, not on the definition.

18) What is the Class?

The template( blueprint) of an object the contains method and attributes of an Object is called class
For Example:

19) What is an object?

An object is nothing just the bundle of methods and attributes, it is used to hold data and perform an action on contained data also helps to carry data from one location another.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Need Help? Chat with us
Scroll to Top