AFour Technologies
HSBC Group Interview Questions and Answers
Q1. Write a function that takes 2 inputs and finds the first the line containing first input and changes it with 2nd input.
Function to find and replace a line in an array of strings
Loop through array to find line containing first input
Replace line with second input
Return updated array
Q2. Do you aware of method overiding?
Method overriding is a feature in object-oriented programming where a subclass provides its own implementation of a method that is already provided by its parent class.
Method overriding is used to achieve runtime polymorphism.
The method signature of the overridden method must be the same as the method in the parent class.
The access level of the overriding method cannot be more restrictive than the overridden method.
Example: public class Animal { public void makeSound() { Syst...read more
Q3. How abstraction and inheritance are related?
Abstraction allows for defining a common interface for related objects, while inheritance enables a class to inherit attributes and methods from another class.
Abstraction involves hiding the implementation details and showing only the necessary features of an object. Inheritance allows a class to inherit properties and behaviors from another class.
Abstraction helps in creating a blueprint of a class without providing the implementation details. Inheritance helps in reusing co...read more
Q4. Given a perticular time, find the angle between hour hand and minute hand.
To find the angle between hour and minute hand at a given time on a clock face.
Calculate the angle made by hour hand with 12:00 on the clock face
Calculate the angle made by minute hand with 12:00 on the clock face
Find the absolute difference between the two angles
If the angle is greater than 180 degrees, subtract it from 360 degrees for the acute angle
Q5. What your expected ctc?
My expected CTC is in line with industry standards and commensurate with my experience and skills.
My expected CTC is based on my experience and skills in the field of QA engineering.
I have researched industry standards and have a realistic expectation for my salary.
I am open to negotiation based on the specific job requirements and benefits package.
I am looking for a fair and competitive salary that reflects my contributions to the company.
Q6. difference between comparable and comparator
Comparable is an interface used for natural ordering while Comparator is an interface used for custom ordering.
Comparable is implemented by the class whose objects need to be sorted
Comparator is implemented separately and passed as an argument to sorting method
Comparable uses compareTo() method for comparison while Comparator uses compare() method
Comparable provides only one way of sorting while Comparator provides multiple ways of sorting
Example: String class implements Comp...read more
Q7. Lets explain thw oops concept?
OOPs is a programming paradigm based on the concept of objects that interact with each other.
OOPs stands for Object-Oriented Programming.
It focuses on creating objects that have properties and methods.
Encapsulation, Inheritance, and Polymorphism are the three main pillars of OOPs.
Encapsulation is the process of hiding the implementation details of an object from the outside world.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allo...read more
Q8. internal working of hashmap
HashMap is a data structure that stores key-value pairs and uses hashing to retrieve values quickly.
HashMap uses an array of buckets to store key-value pairs
Each bucket contains a linked list of entries
Hashing is used to determine the index of the bucket where the entry should be stored
If two keys have the same hashcode, they are stored in the same bucket as a linked list
HashMap allows null keys and values
HashMap is not thread-safe and requires synchronization for concurrent ...read more
Interview Process at HSBC Group
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month