Fatskills
Practice. Master. Repeat.
Study Guide: All The Useful HCL Interview Questions & Answers
Source: https://www.fatskills.com/software-engineering/chapter/all-the-useful-hcl-interview-questions-answers

All The Useful HCL Interview Questions & Answers

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~4 min read

Q 1. State the basic concepts of OOP?

The basic concept of OOP are:

1. Inheritance- It is a mechanism in which a new class is obtained from an already existing class. As in Java, classes can inherit or procure the attributes and methods/processes of other classes. Thus a class that is procured from another class is known as a subclass, on the other hand, the class with the help of which a subclass is procured is known as a superclass.
2. Abstraction- This is among the significant concepts of the OOP (object-oriented programming) languages. The main goal of this is to manage complexity by suppressing irrelevant details from every user. Because of this, the user can implement more complicated logic on the head of the rendered abstraction without knowing or even considering all the unknown complexity.
3. Encapsulation- It can be employed to hide the data members along with member functions. This is to say that encapsulation implies that an internal representation of the object is usually hidden from a display outside of the definition of an object. Typically, particularly the object's personal methods can undeviatingly inspect or manage its fields.

Q 2. What is polymorphism?
It is a really unique thing where it is the ability of it to create many multiple forms through just one use of a function. Because by its name it simply denotes where poly means many or multiple times and morphism means forms. So the main function of it in Java language is to process different types of classes and objects through a single piece of interface that makes it unique.

Q 3. What is basically a servlet?
Servlets are basically something that improves the ability or build the dynamic experience of the server platform.

Q 4. What are applets?
This is to enhance the ability of the user experience through the client platform itself.

Q 5. What is the difference between the JVM, JRE, and JDK?

JVM      Vs   JRE   vs    JDK
This is the heart of the programming language, Java. -     JRE is used for running all the programs of Java. -    It is used for the purpose of development.
It renders platform independence.    - JRE contains JVM.    - JDK also contains JVM.
It provides the core functions of Java. -    JVM is implemented by JRE. It provides the platform to execute the Java programs. -    It is a core component of the programming language, Java.
It is customizable.    - JRE does not possess any sort of development tools. -    It is a platform-specific type of software.
It creates the programs of type- write-once-run-anywhere.  -     JRE is mandatory to run any program of Java.    - JDK is a superset of JRE as it contains JRE in it.

Q 6. What is DBMS?
The Database management system (DBMS), is basically a tool or say a software tool which helps in managing the data of the entire company. Now, this massive amount of data is stored properly and can be presented as information when required to take further decisions.

Q 7. Does every class require a constructor?
Yes obviously every class does require a constructor. The main function of the constructor is to initialize an object which is known as the object initialization process. Thus every class requires the need for the presence of a constructor in it.

Q 8. What is the difference between the static and the instance method?
Static Method:
The function of the static method cannot be overridden because it is bounded within the class. It actually belongs to the class and area.

Instance Method: Whereas the instance method is basically bounded with the object and also it belongs to the heap area.

Q 9. What is actually a singleton class?
It has basically the function where it allows or gives access to create a single object but also it has unique flexibility where if it is required, multiple numbers of objects can also be created.

Q 10. Difference between primary key and a unique key?
Primary Key: In the need of a primary key there must be at least one key at the table and with the use of this key it helps in blocking the duplicate and the also the null value.

Unique Key: Whereas, in the unique key process, there can be more than one key in the table and here it will block the duplicated value and will rather accept the null value.

Q 11. How can one achieve multiple inheritances in the programming language Java?
Multiple inheritances in the programming language Java is not possible by extending a number more than just one class, but even then one can bring about numerous interfaces as per requirement. Therefore, multiple inheritances in Java can not take place but in place of it, multiple interfaces can be implemented in the programming language, Java.