TO THE NEW
Global Infrasolutions Interview Questions and Answers
Q1. Class Student{ int marks, String name } Write a single java 8 Stream Operation to print the name of student having second highest marks.
Using Java 8 Stream, find and print the name of the student with the second highest marks.
Sort the students based on marks in descending order
Skip the first student (highest marks) and find the second student
Print the name of the second student
Q2. Return k the element from the end of a linked list
Return the kth element from the end of a linked list
Traverse the linked list to find the length of the list
Calculate the position of the kth element from the beginning
Traverse the list again to find the kth element from the end
Q3. Iterate hashSet and insert the value inside it
Iterate and insert values into a hashSet in Java
Create a HashSet object
Use a for loop to iterate over the elements to be inserted
Call the add() method on the HashSet object to insert each element
Q4. What is redux What are hooks
Redux is a predictable state container for JavaScript apps. Hooks are a new addition in React 16.8 that lets you use state and other React features without writing a class.
Redux is a state management tool commonly used with React to manage application state in a predictable way
Hooks are a new addition in React 16.8 that allow you to use state and other React features without writing a class
Examples of hooks include useState, useEffect, useContext, etc.
Q5. What is Collection?
A collection is a group of objects or data structures that are stored and manipulated together.
Collections can be used to store and manage multiple elements of the same type.
Examples of collections include arrays, lists, sets, and maps.
Collections provide methods for adding, removing, and accessing elements within the group.
Q6. OOPS concepts with example
OOPS concepts are fundamental to object-oriented programming. They include inheritance, encapsulation, abstraction, and polymorphism.
Inheritance allows a class to inherit properties and methods from another class.
Encapsulation is the practice of hiding data and methods within a class, so they can only be accessed through public methods.
Abstraction is the process of simplifying complex systems by breaking them down into smaller, more manageable parts.
Polymorphism allows object...read more
Q7. Hash Map Working
Hash map is a data structure that stores key-value pairs and allows for efficient retrieval of values based on keys.
Hash map uses a hash function to map keys to indices in an array.
Collision handling is important in hash maps to deal with multiple keys hashing to the same index.
Common operations on hash maps include insertion, deletion, and lookup.
Example: HashMap<String, Integer> map = new HashMap<>(); map.put("key", 123); int value = map.get("key");
Q8. Code snippt of oops
Object-oriented programming is a programming paradigm based on the concept of objects, which can contain data and code.
Encapsulation: bundling data and methods that operate on the data into a single unit
Inheritance: creating new classes based on existing classes
Polymorphism: the ability for objects to be treated as instances of their parent class
Interview Process at Global Infrasolutions
Top Senior Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month