Majesco
10+ HostBooks Interview Questions and Answers
Q1. 1. Diff betn case and decode 2. Primary unique keys 3. Diff betn proc and function 4. Query for 2nd highest sal dept wise 5. Query to find sum witbout using aggregate 6. Queries on count distinct 7. Updating 2...
read moreAnswers to interview questions for Senior Software Engineer
1. CASE is used to provide conditional logic in SQL queries, while DECODE is used to perform conditional value substitution.
2. Primary keys are used to uniquely identify each record in a database table.
3. Procedures and functions are both database objects that encapsulate a series of SQL statements, but functions return a value while procedures do not.
4. SELECT MAX(salary) FROM employees WHERE salary < (SELECT MAX(sal...read more
Q2. Difference between Hashmap Hashtable ?
HashMap is not synchronized and allows null values, while Hashtable is synchronized and does not allow null values.
HashMap is faster and preferred for non-thread-safe operations.
Hashtable is slower but thread-safe.
HashMap allows null values, while Hashtable does not.
HashMap is not synchronized, so it is not suitable for concurrent operations.
Hashtable is synchronized, making it suitable for concurrent operations.
Q3. Oops concepts , what is Garbage collection
Garbage collection is an automatic memory management process in which the system frees up memory occupied by objects that are no longer in use.
Garbage collection is a feature of many programming languages, including Java and C#.
It helps prevent memory leaks and reduces the burden of manual memory management.
The garbage collector identifies and releases memory that is no longer referenced by any active objects.
It works by tracing the object graph and marking objects that are s...read more
Q4. how did you deliver your code?
I delivered my code through version control systems like Git, following best practices for code review and testing.
Used Git for version control to track changes and collaborate with team members
Followed best practices for code review to ensure quality and consistency
Implemented automated testing to catch bugs early and ensure code reliability
Q5. What is dependency injection?
Dependency injection is a design pattern in which components are given their dependencies rather than creating them internally.
Dependency injection helps in achieving loose coupling between classes.
It allows for easier testing by providing a way to mock dependencies.
There are three types of dependency injection: constructor injection, setter injection, and interface injection.
Q6. what is java ?
Java is a high-level programming language known for its portability, security, and object-oriented features.
Java is platform-independent, meaning it can run on any device with a Java Virtual Machine (JVM).
It is object-oriented, allowing for modular and reusable code.
Java is known for its strong security features, such as sandboxing and encryption.
It is widely used for developing web applications, mobile apps, and enterprise software.
Popular frameworks and libraries in Java in...read more
Q7. What is Variable
A variable is a named storage location in a computer's memory that can hold a value.
Variables are used to store and manipulate data in a program.
They have a name, a type, and a value.
The value of a variable can be changed during program execution.
Variables can be used to perform calculations, store user input, or hold intermediate results.
Examples: int age = 25; float temperature = 98.6; string name = 'John';
Q8. Explain the working of Hashmap
Hashmap is a data structure that stores key-value pairs and allows for fast retrieval of values based on keys.
Hashmap uses a hash function to map keys to indices in an array.
It allows for constant time complexity O(1) for insertion, deletion, and retrieval operations.
In case of collisions, separate chaining or open addressing techniques are used to handle them.
Example: HashMap
map = new HashMap<>(); map.put("key1", 1); int value = map.get("key1");
Q9. Explain Inheritance in Java
Inheritance in Java allows a class to inherit properties and behavior from another class.
Allows a class to inherit fields and methods from another class
Promotes code reusability and reduces redundancy
Uses the 'extends' keyword to establish a parent-child relationship
Child class can access non-private members of the parent class
Q10. Explain Interface in Java
Interface in Java is a blueprint of a class that defines a set of methods without implementation.
Interfaces can have abstract methods and constants
Classes can implement multiple interfaces
Interfaces are used for achieving abstraction and multiple inheritance
Q11. Collection framework in detail
Collection framework in Java provides a set of interfaces and classes to store and manipulate groups of objects.
Includes interfaces like List, Set, Map
Classes like ArrayList, LinkedList, HashSet, HashMap
Provides methods for adding, removing, and accessing elements
Allows for easy iteration and manipulation of collections
Top HR Questions asked in HostBooks
Interview Process at HostBooks
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month