Infosys
600+ Quest Global Interview Questions and Answers
Q101. Tell me about oops concepts
Object-oriented programming concepts that focus on classes, objects, inheritance, encapsulation, and polymorphism.
Classes: Blueprint for creating objects with attributes and methods.
Objects: Instances of classes that contain data and behavior.
Inheritance: Ability for a class to inherit properties and methods from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability for objects to be treated as instances of th...read more
Q102. Write a program on polymorphism
Polymorphism is the ability of an object to take on many forms.
Polymorphism allows objects of different classes to be treated as if they are of the same class.
It can be achieved through method overloading or method overriding.
Example: A shape class can have different subclasses like circle, square, and triangle, each with their own implementation of the draw method.
Polymorphism helps in achieving code reusability and flexibility.
Q103. Oops concepts in java
Oops concepts in Java are the fundamental principles of object-oriented programming.
Encapsulation - hiding implementation details and exposing only necessary information
Inheritance - creating new classes from existing ones
Polymorphism - ability of objects to take on multiple forms
Abstraction - focusing on essential features and ignoring non-essential ones
Examples: class, object, inheritance, polymorphism, encapsulation
Q104. print 1 to 100 without for loop
Printing 1 to 100 without for loop
Use recursion to print numbers from 1 to 99
Print 100 outside the recursion
Use a base case to stop recursion at 100
Q105. What is a smart grid
A smart grid is an advanced electrical grid that uses digital technology to monitor and manage the flow of electricity.
A smart grid incorporates sensors, meters, and communication networks to collect data and enable real-time monitoring.
It allows for two-way communication between the utility company and consumers, enabling better energy management and efficiency.
Smart grids can detect and respond to power outages more quickly, reducing downtime and improving reliability.
They ...read more
Q106. Which language you know
I know multiple programming languages including Java, Python, and C++.
Proficient in Java, Python, and C++
Familiar with JavaScript, HTML, and CSS
Experience with SQL and NoSQL databases
Comfortable with Linux and Windows operating systems
Q107. What is tomcat ?
Tomcat is an open-source web server and servlet container developed by the Apache Software Foundation.
Tomcat is used to deploy Java servlets and JSPs for web applications.
It provides a pure Java HTTP web server environment for running Java code.
Tomcat can be integrated with Apache HTTP Server to handle static content.
It is widely used for hosting Java-based web applications.
Q108. Real time example of polymorphism
Polymorphism in programming allows objects to be treated as instances of their parent class, enabling flexibility and reusability.
Polymorphism allows a parent class to be used as a reference to its child classes.
Example: Animal class can be used to reference Dog and Cat classes.
Polymorphism enables method overriding, where child classes can provide their own implementation of methods.
Example: Animal class has a method 'makeSound', Dog class can override it with 'bark' and Cat...read more
Q109. Explain four pillars of oops
The four pillars of OOP are encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: Bundling data and methods that operate on the data into a single unit. Example: Class in Java.
Inheritance: Ability of a class to inherit properties and behavior from another class. Example: Subclass extending a superclass.
Polymorphism: Ability to present the same interface for different data types. Example: Method overloading in Java.
Abstraction: Hiding the complex implementat...read more
Q110. What is meant by polimorphism
Polymorphism refers to the ability of an object to take on multiple forms.
Polymorphism allows objects of different classes to be treated as if they were objects of the same class.
It is achieved through method overriding and method overloading.
Examples include function overloading in C++ and Java, and virtual functions in C++.
Polymorphism makes code more flexible and reusable.
It is a key concept in object-oriented programming.
Q111. What is multithreading
Multithreading is the ability of a CPU to execute multiple threads concurrently, allowing for improved performance and responsiveness.
Multithreading allows multiple threads to run concurrently within the same process.
Each thread has its own stack and program counter, but shares the same memory space.
Multithreading can improve performance by utilizing multiple CPU cores efficiently.
Examples of multithreading include web servers handling multiple requests simultaneously and vid...read more
Q112. Do you know some coding
Yes, I have experience in coding.
Proficient in programming languages such as Java, Python, and C++
Familiar with software development methodologies such as Agile and Waterfall
Experience in developing and maintaining software systems
Ability to troubleshoot and debug code
Examples of projects include developing a web application using Java and Spring framework, and creating a Python script for data analysis
Q113. 1)SQL queries 2) joins in SQL
SQL queries and joins are fundamental to database management.
SQL queries are used to retrieve data from a database.
Joins are used to combine data from two or more tables based on a related column.
Types of joins include inner join, left join, right join, and full outer join.
SQL queries can also be used to insert, update, and delete data from a database.
Q114. What is web service
A web service is a software system designed to support interoperable machine-to-machine interaction over a network.
Web services allow different applications to communicate with each other without time-consuming custom coding.
They use standardized XML messaging system to exchange data.
Examples include SOAP (Simple Object Access Protocol) and REST (Representational State Transfer) web services.
Q115. what is devops lifecycle
DevOps lifecycle is the process of development, testing, deployment, and monitoring of software applications.
Continuous Development: Developers write code and commit changes to version control.
Continuous Integration: Code is automatically built and tested.
Continuous Deployment: Code is deployed to production after passing tests.
Continuous Monitoring: Performance and user feedback are monitored for improvements.
Automation: Tools like Jenkins, Docker, and Ansible are used to st...read more
Q116. what is release management
Release management is the process of managing, planning, scheduling, and controlling software releases.
It involves coordinating the release of software updates or new features to ensure a smooth deployment.
Release management includes tasks such as version control, testing, deployment, and communication with stakeholders.
It aims to minimize risks and disruptions during the release process.
Examples of release management tools include Jenkins, GitLab, and Microsoft Azure DevOps.
Q117. What is a diode
A diode is an electronic component that allows current to flow in only one direction.
It has two terminals, an anode and a cathode.
It is commonly used in rectifiers, voltage regulators, and signal limiters.
Examples include the 1N4148 and 1N4001 diodes.
It can be made of silicon, germanium, or other materials.
It has a forward voltage drop that varies depending on the material and current flow.
Q118. 4. Explain bubble sort algorithm
Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Bubble sort compares adjacent elements in a list and swaps them if they are in the wrong order
It repeats this process until the list is sorted
It has a time complexity of O(n^2)
Example: [5, 3, 8, 4, 2] -> [3, 5, 8, 4, 2] -> [3, 5, 4, 8, 2] -> [3, 5, 4, 2, 8] -> [3, 4, 5, 2, 8] -> [3, 4, 2, 5, 8] -> [3, 4, 2, 5, 8] -> [3, 2, ...read more
Q119. Difference between tuple and list
Tuple is immutable and fixed in size, while list is mutable and can change in size.
Tuple is created using parentheses (), while list is created using square brackets []
Tuple elements cannot be changed once assigned, while list elements can be modified
Tuple is faster than list for iteration and accessing elements
Example: tuple = (1, 2, 3), list = [1, 2, 3]
Q120. Characteristics of oop?
Characteristics of OOP include encapsulation, inheritance, and polymorphism.
Encapsulation: Bundling data and methods that operate on the data into a single unit (class).
Inheritance: Ability to create new classes based on existing classes, inheriting their attributes and methods.
Polymorphism: Ability for objects of different classes to respond to the same message in different ways.
Abstraction: Hiding the complex implementation details and showing only the necessary features of...read more
Q121. Program on palindrome.
A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward.
Check if the given string is equal to its reverse to determine if it is a palindrome.
Ignore spaces, punctuation, and capitalization when checking for palindromes.
Examples: 'racecar', 'A man, a plan, a canal, Panama!'
Q122. Difference between oop and pop
OOP is Object-Oriented Programming while POP is Procedural-Oriented Programming.
OOP focuses on objects and their interactions while POP focuses on procedures and functions.
OOP allows for encapsulation, inheritance, and polymorphism while POP does not.
OOP is more modular and easier to maintain while POP can be more efficient for small programs.
Examples of OOP languages include Java and Python while examples of POP languages include C and Pascal.
Q123. explain inheritance in java
Inheritance in Java allows a class to inherit properties and behaviors from another class.
Inheritance allows for code reusability and promotes a hierarchical relationship between classes.
Subclasses can access the methods and fields of their superclass.
Java supports single and multiple inheritance through classes and interfaces respectively.
Q124. Software development cycle
The software development cycle is a process that software goes through from conception to deployment and maintenance.
The cycle typically includes stages like planning, design, development, testing, deployment, and maintenance.
Each stage involves specific tasks and activities to ensure the software meets requirements and functions properly.
Examples of software development methodologies that follow this cycle include Waterfall, Agile, and DevOps.
Q125. Sql query for join
SQL query for join
Use JOIN keyword to combine rows from two or more tables based on a related column
Specify the columns to be selected using SELECT keyword
Use ON keyword to specify the join condition
Types of join: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN
Q126. Sdlc cycle explain?
SDLC (Software Development Life Cycle) is a process used to develop software applications.
SDLC is a structured approach that consists of several phases: requirements gathering, design, development, testing, deployment, and maintenance.
Each phase has specific activities and deliverables that ensure the successful development and delivery of software.
For example, in the requirements gathering phase, the system engineer works with stakeholders to understand their needs and docum...read more
Q127. Indroduce yourself
I am a dedicated and experienced System Engineer with a strong background in network infrastructure and security.
Experienced in designing and implementing network solutions
Skilled in troubleshooting and resolving technical issues
Proficient in security protocols and measures
You are given a string ‘str’ of ‘N’ lowercase alphabets. Your task is to check whether it is possible to split the given string into three non-empty substrings such that one of them is a substri...read more
Q129. Are you okay to learn front end and back end technologies to ensure you are a complete developer in the longer run? Would you be able to learn the concepts if a timeline is given?? If yes, explain your learning...
read moreYes, I am willing to learn front end and back end technologies and have a learning strategy in place.
I believe in continuous learning and growth as a developer.
I have experience in learning new technologies quickly and efficiently.
My learning strategy involves breaking down concepts into smaller parts and practicing regularly.
I also utilize online resources and seek guidance from experienced colleagues.
Examples of technologies I have learned include React, Node.js, and MongoD...read more
You are given an array/list ARR consisting of N integers. Your task is to find the maximum possible sum of a non-empty subarray(contagious) of this array.
Note: An array C is a subarray of a...read more
You are given two Singly Linked List of integers, which are merging at some node of a third linked list.
Your task is to find the data of the node at which merging starts. If there is...read more
Q132. what do you know about latest technologi in market,have you any idea about AI(Artificial Intelligence), tell me about about AI and where AI used
AI is a technology that enables machines to learn from experience and perform tasks that typically require human intelligence.
AI is used in various industries such as healthcare, finance, and transportation
AI can be used for natural language processing, image recognition, and predictive analytics
Examples of AI include virtual assistants like Siri and Alexa, self-driving cars, and fraud detection systems
AI has the potential to revolutionize industries and improve efficiency an...read more
You are given a binary tree. Return the count of unival sub-trees in the given binary tree. In unival trees, all the nodes, below the root node, have the same value as the data of the root.
For exam...read more
Q134. Are you comfortable using Command Line Interfaces (CLIs) or Integrated Development Environments (IDEs) as part of your daily tasks?
Yes, I am comfortable using both CLIs and IDEs for my daily tasks.
I have experience using various CLIs such as Git Bash, Windows Command Prompt, and Terminal on macOS.
I am proficient in using IDEs such as Visual Studio Code, Eclipse, and IntelliJ IDEA.
I understand the benefits and drawbacks of both CLIs and IDEs and can choose the appropriate tool for the task at hand.
Q135. What is Git, Difference bw GIT and Git Hub, How many branches in your application explain branching strategy, Major issues faced in git, how you integrated git with jenkins
Git is a version control system. GitHub is a web-based Git repository hosting service.
Git is a distributed version control system used for tracking changes in source code during software development.
GitHub is a web-based Git repository hosting service that provides a graphical interface and tools for collaboration.
Git has multiple branches that can be used for parallel development and feature branching.
Branching strategy can be based on feature, release, or hotfix.
Major issue...read more
Write a program to do basic string compression. For a character which is consecutively repeated more than once, replace consecutive duplicate occurrences with the count of repetitions.
Exampl...read more
Q137. Suppose there are two tables: A Customer table and an Order table. The Order table has a column OrderID CustomerID, OrderStatus, and TotalAmount. The Customer table has the columns CustomerID, CustomerName, Pho...
read moreQuery to print CustomerID, CustomerName, OrderStatus, and TotalAmount excluding orders placed in August.
Join Customer and Order tables on CustomerID
Filter out orders placed in August using WHERE clause
Select CustomerID, CustomerName, OrderStatus, and TotalAmount columns
Q138. What is CICD, How you configured Jenkins for your application, How you integrated tools with jenkins, How you deployed your application, Jenkins Security
CICD is a software development practice that aims to automate the building, testing, and deployment of applications.
Configured Jenkins to build, test, and deploy the application automatically
Integrated tools such as Git, Maven, and SonarQube with Jenkins
Deployed the application to a test environment using Jenkins pipeline
Implemented Jenkins security by creating users, roles, and permissions
Function and coding practices of python were questioned. Question on predefined functions and then finally implementation of OOP concept in python.
Questions were focused on resume, skills, an...read more
There are an infinite number of electric bulbs. Each bulb is assigned a unique integer starting from 1. There are ‘N’ switches also and each switch is labeled by a unique prime number. If a switch ...read more
Q141. 1. Journal entry for Purchase with GST 2. Explain any one Ind AS 3. What is SAP? 4. What is ERP? 5. Why IT industry? 6. What is the use of Flash-Fill in Excel? 7. Any 5 excel features. (Pivot table, macros, fla...
read moreInterview questions for SAP Fico Consultant
Journal entry for Purchase with GST involves debiting the Purchases account and crediting the Input GST account
Ind AS stands for Indian Accounting Standards, one of which is Ind AS 116 on Leases
SAP is a software company that provides enterprise software to manage business operations and customer relations
ERP stands for Enterprise Resource Planning, a software system that integrates business processes and data
IT industry offers opport...read more
Q142. Do you think algorithms and pseudocodes still play a role in the world of IT Services?
Yes, algorithms and pseudocodes are still important in IT Services.
Algorithms are used in various fields of IT such as machine learning, data analysis, and cryptography.
Pseudocodes are used to plan and design algorithms before coding them.
Understanding algorithms and pseudocodes is essential for software engineers to write efficient and optimized code.
Examples of algorithms include sorting algorithms, search algorithms, and graph algorithms.
You are given an array of integers ARR[] of size N consisting of zeros and ones. You have to select a subset and flip bits of that subset. You have to return the count of maximum one’s that you can obt...read more
Q144. Do you have experience with working on Linux?
Yes, I have experience working on Linux.
I have worked on various Linux distributions such as Ubuntu, CentOS, and Debian.
I am familiar with command-line interface and shell scripting on Linux.
I have experience setting up and configuring web servers like Apache and Nginx on Linux.
I have worked with Linux-based cloud platforms like AWS and Google Cloud.
I have also contributed to open-source projects on Linux.
Q145. Explain the scenarios where If and Switch Case statements are used.
If and Switch Case statements are used for conditional branching in programming.
If statements are used for simple conditional branching.
Switch Case statements are used for multiple conditional branching.
If statements are more flexible than Switch Case statements.
Switch Case statements are more efficient than If statements for large number of conditions.
If statements can be nested, but Switch Case statements cannot.
Examples: If statement - if(age > 18) { //do something }, Swit...read more
Q146. What is the approach of consulting If I have to select between Power bi and tableau.. What are the factors I will consider? Discussion on resume
Consulting approach involves analyzing problems, providing solutions and implementing them.
Understand client's needs and goals
Analyze data and identify key insights
Develop recommendations and solutions
Implement solutions and monitor progress
Factors to consider when choosing between Power BI and Tableau include cost, ease of use, data visualization capabilities, and integration with other tools
Resume should highlight relevant experience and skills in consulting and data analys...read more
Q147. which cloud used in your application and explain the services, EC2, S3 VPC Route53, ALB, EBS
Our application uses Amazon Web Services (AWS) cloud platform.
EC2 (Elastic Compute Cloud) is used for scalable computing capacity.
S3 (Simple Storage Service) is used for object storage and retrieval.
VPC (Virtual Private Cloud) is used for creating a private network within AWS.
Route53 is used for DNS management and routing traffic to AWS resources.
ALB (Application Load Balancer) is used for distributing incoming traffic across multiple targets.
EBS (Elastic Block Store) is used...read more
Q148. What are the differences between C and C++?
C++ is an extension of C with object-oriented programming features.
C++ supports classes and objects while C does not.
C++ has built-in support for polymorphism and inheritance.
C++ has a standard template library (STL) while C does not.
C++ allows function overloading while C does not.
C++ has exception handling while C does not.
Q149. Is it possible to achieve method overloading within a private class in Java?
No, method overloading is not possible within a private class in Java.
Method overloading is achieved by having multiple methods in the same class with the same name but different parameters.
Private methods are not visible outside the class, so overloading them would not be useful.
If you need to achieve method overloading, the methods should be public or protected.
Q150. What is python and difference between java and python
Python is a high-level, interpreted programming language. Java is a compiled language.
Python is dynamically typed while Java is statically typed
Python has simpler syntax and is easier to learn than Java
Java is faster and more efficient than Python
Python is better suited for data analysis and machine learning while Java is better for enterprise applications
Python has a larger community and more libraries than Java
Q151. What are the activities will be performed in a Bank Audit
Activities in a Bank Audit include examining financial records, assessing internal controls, and ensuring compliance with regulations.
Reviewing financial statements and transactions
Assessing internal controls and risk management processes
Evaluating compliance with regulatory requirements
Testing the effectiveness of anti-money laundering procedures
Analyzing loan portfolios and credit risk
Verifying the accuracy of interest calculations
Assessing the adequacy of capital reserves
Q152. What is the logic of the code for finding duplicate numbers in an array?
Code logic to find duplicate numbers in an array
Iterate through the array and store each element in a hash set
If an element is already in the hash set, it is a duplicate
Return the set of duplicate numbers found
Q153. what is the solution for resolving conflicts in a git merge?
Conflicts in a git merge can be resolved by manually editing the conflicting files and then committing the changes.
Use 'git status' to identify the conflicting files
Open the conflicting files in a text editor and resolve the conflicts manually
Use 'git add' to stage the resolved files
Commit the changes using 'git commit'
Q154. Which tree is used in TreeMap and what is the implementation of it?
TreeMap in Java uses Red-Black tree for implementation.
TreeMap in Java uses Red-Black tree for implementation
Red-Black tree is a self-balancing binary search tree
Red-Black tree ensures logarithmic time complexity for operations like get, put, remove
Q155. What is the inversion of control and how does it work?
Inversion of control is a design principle where the control flow of a program is inverted, with the framework or container calling the code instead of the code calling the framework.
Inversion of control allows for decoupling of components, making the code more modular and easier to maintain.
Common examples of inversion of control include dependency injection and event-driven programming.
Inversion of control is often used in frameworks like Spring in Java or Angular in JavaSc...read more
Q156. What are the types of joins and what is the difference between them?
Types of joins in SQL include inner join, outer join (left, right, full), cross join, and self join.
Inner join: returns rows when there is a match in both tables based on the join condition.
Outer join: returns all rows from one table and only matching rows from the other table.
Left outer join: returns all rows from the left table and the matched rows from the right table.
Right outer join: returns all rows from the right table and the matched rows from the left table.
Full oute...read more
Q157. How many such letter-pairs are there in the word SERVANT, having the same no. of letters left between them in the word as they have in the series?
Counting letter-pairs with same no. of letters left between them in the word SERVANT.
Identify the letter-pairs in the word SERVANT.
Count the number of letters between each pair.
Compare the count with the position of the pair in the word.
If they match, increment the count of such pairs.
Answer the total count of such pairs.
Q158. Do you know about hashing function?
Hashing function is a mathematical function that converts data of arbitrary size to a fixed size.
Hashing is used for data integrity and security purposes.
Hash functions are one-way functions, meaning it is difficult to reverse engineer the original data from the hash value.
Examples of hashing algorithms include MD5, SHA-1, and SHA-256.
Q159. Tell me the flow of HTTP requests for the backend in Java.
HTTP requests in Java backend flow from client to server through various layers like servlets, filters, and controllers.
Client sends HTTP request to server
Request is received by servlet container (e.g. Tomcat)
Servlet container forwards request to appropriate servlet based on URL mapping
Servlet processes request and generates response
Response is sent back to client
Q160. What is circular linked list and doubly linked list?
Circular linked list is a linked list where the last node points to the first node. Doubly linked list has nodes with pointers to both previous and next nodes.
Circular linked list is useful for applications where data needs to be accessed in a circular manner, such as a playlist.
Doubly linked list allows for traversal in both directions, making it useful for applications such as a browser history.
Both types of linked lists require extra memory for storing pointers to previous...read more
Q161. Introduce yourself 1.What is STLC 2. difference between Test plan,test case,test scanario 3.Positive and negative scanarion on pen. 4.selenium framework. 5.how to write selenium test cases.
I am an Automation Test Engineer with knowledge of STLC, test plan, test case, test scenario, Selenium framework, and writing Selenium test cases.
STLC stands for Software Testing Life Cycle and is a process followed to ensure quality in software testing.
Test plan is a document that outlines the testing strategy, objectives, and scope of testing.
Test case is a set of steps and conditions that are executed to verify the functionality of a software application.
Test scenario is a...read more
You have been given a grid containing some oranges. Each cell of this grid has one of the three integers values:
Q163. 1. Find the first occurrence of the target value in a sorted array. (Duplicates are allowed)
Find the first occurrence of target value in a sorted array with duplicates.
Use binary search to find the target value.
If found, check if the previous element is also the target value.
If not, return the index of the target value.
If yes, continue binary search on the left subarray.
Q164. How to write the code in Lambda for EC2 Provisioning.
Use AWS Lambda to automate EC2 provisioning by writing code in Python or Node.js.
Create a Lambda function in AWS console.
Write code in Python or Node.js to describe the EC2 instance to be provisioned.
Use AWS SDK to interact with EC2 API for provisioning.
Handle error cases and cleanup resources after provisioning.
Test the Lambda function to ensure it provisions EC2 instances correctly.
Q165. What's marginal costing, Variable cost and Fixed cost
Marginal costing is a costing technique where only variable costs are considered in determining the cost of a product or service.
Variable costs are costs that vary with the level of production or sales, such as raw materials and direct labor.
Fixed costs are costs that remain constant regardless of the level of production or sales, such as rent and salaries.
Marginal costing helps in making short-term decisions by focusing on the impact of variable costs on profitability.
Exampl...read more
Q166. Why is object creation not possible for abstract classes?
Object creation is not possible for abstract classes because they cannot be instantiated directly.
Abstract classes are meant to be used as base classes for other classes to inherit from.
They contain abstract methods that must be implemented by the child classes.
Attempting to create an object of an abstract class will result in a compilation error.
Example: abstract class Shape { abstract void draw(); }
Q167. What are the key differences between LinkedList and HashSet?
LinkedList is a linear data structure that stores elements in a sequential order, while HashSet is a collection that does not allow duplicate elements.
LinkedList maintains the insertion order of elements, while HashSet does not guarantee any specific order.
LinkedList allows duplicate elements, while HashSet does not allow duplicates.
LinkedList uses pointers to connect elements, while HashSet uses a hash table for storing elements.
Example: LinkedList
linkedList = new LinkedLis...read more
Q168. What are the different types of dependency injection?
Dependency injection is a design pattern in which an object receives other objects that it depends on.
Constructor injection: Dependencies are provided through a class constructor.
Setter injection: Dependencies are set through setter methods.
Interface injection: Dependencies are set through an interface.
Example: In constructor injection, a class may have a constructor that takes the dependencies as parameters.
Q169. What is the flow of dependency injection in Spring Boot?
Dependency injection in Spring Boot allows objects to be injected into a class, promoting loose coupling and easier testing.
In Spring Boot, dependency injection is achieved through @Autowired annotation.
Dependencies are managed by the Spring container and injected into classes at runtime.
Constructor injection, setter injection, and field injection are common ways to inject dependencies in Spring Boot.
Example: @Autowired private UserService userService; // Field injection
Q170. What is the difference between @RestController and @Request mapping?
Difference between @RestController and @RequestMapping
RestController is a specialized version of @Controller that includes @ResponseBody by default
@RequestMapping is used to map web requests to specific handler methods
RestController is typically used for RESTful web services, while @RequestMapping can be used for any type of web request handling
Q171. what is the difference between stream and collection in Java?
Streams represent a sequence of elements and support functional-style operations, while collections are data structures that store and manipulate groups of objects.
Streams are used for processing sequences of elements, while collections are used for storing and manipulating groups of objects.
Streams support functional-style operations like filter, map, reduce, while collections provide methods like add, remove, get.
Streams are lazy, meaning they don't store elements, while co...read more
You have given a 2-dimensional array ‘ARR’ with ‘N’ rows and ‘M’ columns in which each element contains only two values,i.e., 0 and 1. Your task is to convert the given matrix into the Good matrix i...read more
Q173. Write ibpl query with where and order by conditions
Write an SQL query with WHERE and ORDER BY conditions
Use the IBPL (InfluxDB PromQL) query language
Specify the WHERE condition to filter the data
Use the ORDER BY clause to sort the results
Q174. what is a trigger in SQL and how is it used?
A trigger in SQL is a special type of stored procedure that is automatically executed when certain events occur in a database.
Triggers can be used to enforce business rules, maintain referential integrity, and automate repetitive tasks.
There are two main types of triggers in SQL: BEFORE triggers and AFTER triggers.
An example of a trigger is a BEFORE INSERT trigger that automatically sets a default value for a column if no value is provided.
Q175. Does java use call by value or call be reference?
Java uses call by value.
Java passes a copy of the value of a variable to a method, not the actual variable itself.
Changes made to the parameter inside the method have no effect on the original variable.
However, if the parameter is an object reference, the reference is passed by value, so changes to the object itself will be reflected outside the method.
Q176. Why java language is platform-independent?
Java is platform-independent due to its bytecode and virtual machine architecture.
Java code is compiled into bytecode, which can run on any platform with a Java Virtual Machine (JVM).
JVM acts as an interpreter, translating bytecode into machine code specific to the platform it is running on.
This allows Java programs to be written once and run on any platform with a JVM installed.
For example, a Java program written on a Windows machine can run on a Linux machine without any mo...read more
You have been given two integers ‘DAY_HOURS’ and ‘PARTS’. Where ‘DAY_HOURS’ is the number of hours in a day and a day can be divided into ‘PARTS’ equal parts. Your task is to find total instance...read more
Q178. How do you value the Inventory as per AS-2
Inventory is valued as per AS-2 by using the lower of cost or net realizable value method.
Inventory is valued at the lower of cost or net realizable value as per AS-2.
Cost of inventory includes all costs incurred in bringing the inventory to its present location and condition.
Net realizable value is the estimated selling price in the ordinary course of business, less estimated costs of completion and selling expenses.
Examples of costs included in inventory valuation are purch...read more
Q179. How was agile followed in project?
Agile was followed in the project by implementing iterative development, continuous feedback, and collaboration.
The project used Scrum framework for agile implementation.
Sprints were planned and executed to deliver incremental value.
Daily stand-up meetings were held to discuss progress and address any issues.
Backlog grooming sessions were conducted to prioritize and refine user stories.
Continuous integration and automated testing were used to ensure code quality.
Regular retro...read more
Q180. What is the purpose of exception handling in Java?
Exception handling in Java is used to handle runtime errors and prevent program crashes.
Purpose is to handle runtime errors and prevent program crashes
Allows for graceful handling of unexpected situations
Helps in separating error-handling code from regular code
Improves code readability and maintainability
Examples: try-catch blocks, throw keyword, finally block
Q181. How do you call a private method in another class?
You can call a private method in another class by using reflection in Java.
Use the getDeclaredMethod() method from the Class class to get the private method
Set the accessibility of the private method to true using the setAccessible() method
Invoke the private method using the invoke() method
Q182. What is the purpose of dependence injection?
Dependency injection is a design pattern used to remove hard-coded dependencies and make components more reusable and testable.
Allows for easier testing by injecting dependencies rather than hard-coding them
Promotes reusability of components by decoupling them from their dependencies
Improves maintainability by making it easier to swap out dependencies without changing the component's code
Q183. How do you create a spring boot application?
To create a Spring Boot application, you can use Spring Initializr to generate a project with necessary dependencies and configurations.
Go to https://start.spring.io/
Select the project metadata like group, artifact, dependencies, etc.
Click on 'Generate' to download the project zip file.
Extract the zip file and import the project into your IDE.
Start coding your application logic.
Q184. What are starter dependencies in spring boot?
Starter dependencies in Spring Boot are pre-configured dependencies that help in quickly setting up a Spring Boot project.
Starter dependencies are included in the pom.xml file of a Spring Boot project to provide necessary dependencies for specific functionalities.
They help in reducing the manual configuration required to set up a Spring Boot application.
Examples of starter dependencies include spring-boot-starter-web for web applications, spring-boot-starter-data-jpa for JPA ...read more
Q185. What is the problem statement you are resolving
Resolving inefficiencies in the current supply chain process
Identifying bottlenecks in the supply chain
Implementing technology solutions to streamline processes
Reducing lead times and improving inventory management
Enhancing communication between suppliers and distributors
Q186. Write a Java code and Angular code to retrieve the data from the given URL. "-----/"
Retrieve data from a given URL using Java and Angular code.
Use Java's HttpURLConnection class to make a GET request to the URL and retrieve the data.
In Angular, use HttpClient module to send a GET request to the URL and fetch the data.
Parse the retrieved data in both Java and Angular to extract the required information.
You are given a 2D matrix, your task is to return a 2D vector containing all elements of the matrix in a diagonal fashion.
Example:
Following will be the output of the above matrix:
1 5 2 9 6 3 1...read more
Q188. Point out the differences between Costing and Accounting
Costing focuses on determining the cost of producing a product or service, while accounting involves recording, summarizing, and analyzing financial transactions.
Costing is more focused on determining the cost of producing a specific product or service.
Accounting involves recording, summarizing, and analyzing financial transactions of a business.
Costing helps in setting prices for products, while accounting helps in financial decision-making and reporting.
Costing is more deta...read more
Q189. Real-life examples of management, risk-taking, learning appetite etc.
Examples of management, risk-taking, and learning appetite.
As a manager, I led a team of 10 in a project that resulted in a 20% increase in revenue.
I took a risk by proposing a new marketing strategy that was initially met with skepticism, but ultimately led to a 15% increase in customer engagement.
I have a strong learning appetite and regularly attend industry conferences and workshops to stay up-to-date on the latest trends and best practices.
In my previous role, I identifi...read more
Q190. Q1: Java program to filter employee object from the list using streams.
Filter employee objects from a list using Java streams.
Use stream() method to convert the list to a stream.
Use filter() method to specify the condition for filtering employee objects.
Use collect() method to collect the filtered employee objects into a new list.
Q191. 2. Find the maximum subarray sum given an array with positive and negative integers.
Find the maximum subarray sum in an array with positive and negative integers.
Use Kadane's algorithm to find the maximum subarray sum.
Initialize two variables, one for current maximum and one for global maximum.
Iterate through the array and update the variables accordingly.
Return the global maximum.
Example: [-2, 1, -3, 4, -1, 2, 1, -5, 4] returns 6 (subarray [4, -1, 2, 1])
Ninja has its own technique of making a decision to do something or not. This technique is known as the ninja technique. In this technique, Ninja generates a random string containing only digits,...read more
For a given Singly Linked List of integers, sort the list using the 'Merge Sort' algorithm.
Input format :
The first and the only line of input contains the elements of the linked list sepa...read more
Q194. Can instances of abstract class be created?
No, instances of abstract class cannot be created.
Abstract classes are incomplete and cannot be instantiated.
They are meant to be extended by subclasses that provide concrete implementations.
Abstract classes can have abstract methods that must be implemented by the subclass.
Example: abstract class Animal cannot be instantiated, but subclasses like Dog and Cat can be.
Q195. Write a template to create the Cloud formation stacks.
Template for creating CloudFormation stacks
Define the resources to be created in the stack
Specify the properties for each resource
Set up dependencies between resources
Include any parameters or conditions needed for the stack
Use AWS CloudFormation Designer or AWS CLI to create the stack
Q196. When can we use multiple catch blocks?
Multiple catch blocks can be used to handle different types of exceptions in a try-catch block.
Multiple catch blocks can be used to handle different types of exceptions separately.
Each catch block can specify a different type of exception to catch.
The catch blocks are evaluated in order, so the most specific exception types should be caught first.
Using multiple catch blocks can make the code more readable and maintainable.
Q197. How can we achieve inheritance in Java?
Inheritance in Java allows a class to inherit properties and behaviors from another class.
Create a new class using the 'extends' keyword followed by the name of the class you want to inherit from
Use super keyword to call the constructor of the parent class
Child class can override methods from the parent class
Q198. What do you know about AI?
AI stands for Artificial Intelligence, which is the simulation of human intelligence in machines.
AI involves the development of intelligent machines that can perform tasks that typically require human intelligence.
It encompasses various subfields such as machine learning, natural language processing, computer vision, and robotics.
AI is used in various applications like virtual assistants (e.g., Siri), recommendation systems (e.g., Netflix), and autonomous vehicles.
Deep learni...read more
Q199. What is SDLC,explain steps in SDLC
SDLC stands for Software Development Life Cycle, which is a process used to design, develop, and test software.
The steps in SDLC are planning, analysis, design, development, testing, deployment, and maintenance.
During planning, the project scope and requirements are defined.
Analysis involves gathering and analyzing user requirements.
Design involves creating a detailed plan for the software.
Development involves coding and building the software.
Testing involves verifying that t...read more
Q200. What is opp in java? What are concepts in opps
OOP stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects.
OOP is a way of organizing and designing code around objects
It emphasizes encapsulation, inheritance, and polymorphism
Encapsulation is the practice of hiding data and methods within an object
Inheritance allows objects to inherit properties and methods from a parent object
Polymorphism allows objects to take on multiple forms or behaviors
Examples of OOP languages include Jav...read more
Top HR Questions asked in Quest Global
Interview Process at Quest Global
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month