Saturday, January 19, 2019

HCL Technical basic Questions..!!

HCL Technical Questions


1) Does every class have a Constructor?

Yes, every class needs a Constructor. It may be Parameterized or Default. If the user does not define a constructor within a class, the default constructor is always included in that code.
The objective of Constructor is to initialize an object called object initialization. Constructors are mainly created for initializing an object.

2) How Java enable High Performance?

Java uses a Just-In-Time Compiler to enable high performance. Just-In-Time Compiler is a program that turns Java bytecode, which is a program that contains an instruction that must be interpreted into instruction that can be sent directly to the processor.

3) Why is java considered as dynamic?

It is designed to change the evolving environment. Java can carry an extensive amount of runtime information that can be used to verify and resolve access to the object at runtime.

4) What is joins in SQL?

Joins is nothing but connecting two or more table to fetch the record from two or more databases.

5) Can we have Private Constructor in Java?

Private Constructor is used if you do not want other class to instantiate the object. Private Constructor is used in Singleton design Pattern, Factory Method Design Pattern.

6) Differentiate Between Primary Key and Unique Key.

Primary Key Unique Key
1. In a Primary key, there should be only one primary key in a table. 1. In A Unique key, there can be more than one unique key in a table.
2. Primary key will block duplicate value and a null value. 2. Unique key will block duplicate value and accept a null value.

7) Differentiate between Method Overloading and Method Overriding.

Method Overloading Method Overriding
1. Method Overloading is used to gain the readability of the program. 1. Method Overriding is used to provide the specific implementation of the method that already provided by the superclass.
2. In the case of Method Overloading, the parameter must be different. 2. In the case of Method Overriding, the parameter must be equal.
3. Overloading happens at Compile time. 3. Overriding happens at runtime.
4. The Return type of method does not matter in case of method overloading it can be the same or different. 4. In the case of method Overriding, the return type must be the same.
5. you can overload a static, final and private method in Java 5. You cannot override a static, final and private method in Java.

8) What is the purpose of finalize () method in Java?

Finalize () method in java is a special method much like the main method in java. Finalize () method is called before garbage collector reclaims the object, its last chance for any object to perform clean up activity i.e. releasing any fixed order resources held, terminating connection if open etc.

9) Why can static method not override?

A static method cannot override because the static method is bound with class whereas instance method is bound with an object. Static method belongs to the class area and Instance method belong to the heap area.

10) What is singleton Class?

Singleton Class limited the number to one but allowing the flexibility to create more object if the situation changes.

11) Can we override java main method?

No, because main is a Static Method.

12) What is Class Cast Exception?

Class Cast Exception is thrown by java when you try to cast an object of one data type to another data type. Java allows us to cast the variable of one type to another as long as the casting happens between compatible data type.

13) Why polymorphism is used in Java?

The good reason for why polymorphism is a need in Java because the concept is extensively used in implementing inheritance. It plays an important role in allowing the object having a different internal structure to share the same external interface.

14) What is an Abstract class?

An Abstract class is one that is not used to create an object. It is only used as base class for the other class. The Abstract class is always public or friendly.
Syntax:
  1. public abstract class class_name  
  2.         {  
  3.             //class member  
  4.         }  

15) Can I have Private Constructor in Abstract Class?

Abstract Class can have Private Constructor But that class cannot be extended by another class. Alternatively, of adding a static inner class inside the Abstract Class and extends that Abstract Class.

HCL HR Interview Questions


1) Tell us about yourself.

This is the most common questions asked for both fresher's as well as experienced candidates. Well, you should answer this question in the following way:
Good Morning Sir/Mam
Hello, this is Ginni Bhatia. I belong to Kurukshetra. I have Completed MCA from Panipat Institute of Engineering and Technology College, in the specialization of Computer Science with an aggregate of 70% which is affiliated in Kurukshetra University. I have done B.Com (VOC) from Dayanand Mahila College with an aggregate of 65% which is also affiliated in Kurukshetra University. And I have also done Post Graduate Diploma in Computer Application (P.G.D.C.A) with an aggregate of 6.9(CGPA) from Lovely Professional University. My hobbies are singing a song, Dancing, Watching Movies and I love Web Designing. My strength is that I am Honest, Sincere, Responsible, and Positive. My weakness is that I am lazy. Talking about my achievements, I got certified in Singing level Competition. I have completed my Academic Project is ERP SYSTEM. My short-term goal is to be a part of your Company. My long-term goal is to be successful in every parameter of this company.
That's all about me sir.
Thanks for giving me time to introduce myself.

2) Why should we hire you?

As a Fresher, It is a great opportunity for me to work in a good company which helps me for the better career.

3) What is the difference between Confidence and Over-Confidence?

Confidence: - I can do it.
Overconfidence: - Only I can do it.

4) How do you feel about working nights and weekends?

Yes, if the Company needs me then I am ready to work at any time.

5) Can you work under pressure?

Yes, I can work under pressure; the pressure is nothing but encourages to do work sincerely.

6) What makes you angry?

I get angry when someone putting me down.

7) Where do you see yourself five years from now?

I can see myself growing with this company and reaching a position where I become valuable assets for this organization.

8) How much salary do you expect?

As a fresher, I would like to prefer Company norms.

9) Why did you leave your previous job?

Sir/mam, it's a career move. I have learned a lot from my past job.
But now, I am focused on a new challenge.

10) On the scale of one to ten, rate me as an interviewer.


Sir, you are more knowledgeable, more experienced than me I am not on a level to judge you.

2 comments: