Informatica
30+ Gerab National Enterprises Interview Questions and Answers
Q1. Can Static method be overload and override?
Yes, static methods can be overloaded but not overridden.
Overloading is having multiple methods with the same name but different parameters.
Static methods cannot be overridden as they belong to the class and not the instance.
Example of overloading: public static void method(int a) and public static void method(int a, int b)
Q2. How Query parameter differs fromm Path Parameter?
Query parameters are appended to the end of a URL after a '?' while path parameters are part of the URL path.
Query parameters are optional and can be used to filter or sort data.
Path parameters are mandatory and used to identify a specific resource.
Query parameters are separated by '&' while path parameters are separated by '/'.
Example of query parameter: www.example.com/search?q=keyword
Example of path parameter: www.example.com/users/123
Q3. How postman allows the log request and response
Postman allows logging of request and response through its console feature.
Postman's console feature allows logging of request and response data
To enable logging, go to the console tab and select 'All' from the dropdown menu
The console displays the request and response data along with other details like headers and status codes
Q4. JAVA progam to reverse a string and repeated occurance with and without loops
JAVA program to reverse a string and repeated occurrence with and without loops
Use StringBuilder class to reverse the string without loops
Use for loop to reverse the string with loops
Use HashMap to count the occurrence of each character
Use LinkedHashMap to maintain the order of occurrence
Q5. How do you quickly count the number of set bits in a 32-bit integer in linear time (with respect to the number of set bits)?
Count set bits in a 32-bit integer in linear time
Use bit manipulation to count set bits
Divide the integer into 16-bit chunks and count set bits in each chunk
Use lookup tables to count set bits in each 8-bit chunk
Use parallel processing to count set bits in multiple integers simultaneously
Q6. Diff between Method Overloading and Method Overriding in JAVA.
Method Overloading is having multiple methods with the same name but different parameters. Method Overriding is having a method in a subclass with the same name and parameters as a method in its superclass.
Method Overloading is done in the same class while Method Overriding is done in different classes.
Method Overloading is used to add more behavior to a method while Method Overriding is used to change the behavior of a method.
Method Overloading is resolved at compile-time wh...read more
Q7. JAVA Program to reverse a String and Repeated number/occurance times.
JAVA program to reverse a String and count repeated occurrences.
Use StringBuilder to reverse the String.
Use a HashMap to count the occurrences of each character.
Iterate through the HashMap to print the repeated characters and their count.
Q8. How to set the same header name in API
To set the same header name in API, use the 'setHeader' method in the API request.
Identify the header name that needs to be set.
Use the 'setHeader' method in the API request to set the header name.
Pass the header name and value as parameters to the 'setHeader' method.
Example: request.setHeader('Authorization', 'Bearer
')
Q9. What is random and dynamic data requests
Random and dynamic data requests are requests for data that is not predetermined or fixed.
Random data requests are requests for data that is not predetermined or fixed.
Dynamic data requests are requests for data that changes frequently.
Examples of random and dynamic data requests include user input, sensor data, and API responses.
Q10. API response codes that you have frequently faced
Frequently faced API response codes include 200, 400, 401, 404, and 500.
200 - OK: Successful request
400 - Bad Request: Invalid input or missing parameters
401 - Unauthorized: Authentication failure
404 - Not Found: Requested resource not found
500 - Internal Server Error: Server-side error
Q11. What is CURL Command?
CURL is a command-line tool used to transfer data to or from a server using various protocols.
CURL stands for 'Client URL'
It supports various protocols like HTTP, FTP, SMTP, etc.
It can be used to send requests and receive responses from a server
It can be used to test APIs and web services
Example: curl https://www.example.com -v
Q12. Given an Array of Integers, Find two elements in the array whose sum is closest to zero?
Find two integers in an array whose sum is closest to zero.
Sort the array in ascending order.
Initialize two pointers at the beginning and end of the array.
Move the pointers towards each other until the sum is closest to zero.
Q13. Why String is Immutable?
String is immutable because it cannot be changed once created.
String objects are stored in a constant pool, which cannot be modified.
Any operation on a string creates a new string object.
This ensures thread safety and prevents unintended changes to the string.
For example, if a string is used as a key in a map, its immutability guarantees that the key will not change.
Q14. How BDD differs from TDD
BDD focuses on behavior and collaboration while TDD focuses on testing and development.
BDD involves collaboration between developers, testers, and business stakeholders to define behavior in a common language
TDD involves writing tests before writing code to ensure code meets requirements
BDD uses scenarios to describe behavior while TDD uses test cases to verify functionality
BDD is more focused on the end-user experience while TDD is more focused on code functionality
BDD can b...read more
Q15. Explain about Waits Concepts in Selenium
Waits in Selenium are used to synchronize the test script execution with the application's response.
Waits are used to handle synchronization issues in Selenium
There are two types of waits: Implicit and Explicit
Implicit waits wait for a certain amount of time before throwing an exception
Explicit waits wait for a certain condition to occur before proceeding with the test script
Examples of explicit waits include: WebDriverWait, FluentWait
Q16. What are API request methods
API request methods are the actions that can be performed on a web API.
API request methods include GET, POST, PUT, DELETE, PATCH, and OPTIONS.
GET is used to retrieve data from the server.
POST is used to submit data to the server.
PUT is used to update existing data on the server.
DELETE is used to delete data from the server.
PATCH is used to partially update existing data on the server.
OPTIONS is used to retrieve information about the communication options available for a resou...read more
Q17. Code for deleting the duplicate nodes in a sorted link list?
Code to delete duplicate nodes in a sorted linked list
Traverse the linked list and compare adjacent nodes
If nodes are equal, delete one of them
Repeat until all duplicates are removed
Q18. Explain about OOPS Concept
OOPS is a programming paradigm based on the concept of objects that interact with each other to perform tasks.
OOPS stands for Object-Oriented Programming System
It focuses on creating reusable code and organizing it into objects
It includes concepts like inheritance, encapsulation, polymorphism, and abstraction
Example: A car object can have properties like color, model, and speed, and methods like start, stop, and accelerate
OOPS languages include Java, C++, Python, and Ruby
Q19. 1.selenium code from scratch 2. Rest api code from scratch 3. Java collection 4. programs based on ds like count each element of string. 5. Duplicate in string 6. use algorithm with o(n) not o(n2). 7. core java...
read moreInterview questions for QA Engineer including Selenium, Rest API, Java collection, and programming based on data structures.
Demonstrate ability to write Selenium code from scratch
Show proficiency in writing Rest API code from scratch
Exhibit knowledge of Java collection and its implementation
Be able to write programs based on data structures like counting each element of a string and finding duplicates
Use algorithms with O(n) complexity instead of O(n^2)
Have a strong understan...read more
Q20. Why files are preferred over databases?
Files are preferred over databases for certain types of data and applications.
Files are faster for small amounts of data.
Files are easier to manage and backup.
Files are more flexible for certain types of data, such as images or videos.
Databases are better for complex data relationships and queries.
Databases are more secure and scalable for large amounts of data.
The choice between files and databases depends on the specific needs of the application.
Q21. Printing root to leaf paths in a binary search tree
Printing all root to leaf paths in a binary search tree
Traverse the tree recursively and keep track of the current path
When a leaf node is reached, add the current path to the list of paths
Print all the paths in the list
Use an array of strings to store the paths
Q22. Determining width of binary tree i.e. using breadth wise traversal
To determine the width of a binary tree using breadth-wise traversal, we need to count the number of nodes at each level.
Perform a breadth-first traversal of the binary tree
Count the number of nodes at each level
Keep track of the maximum number of nodes seen at any level
Return the maximum number of nodes seen
Q23. Kafka architecture and why don't we persist data in permanently.
Kafka is a distributed streaming platform that allows for real-time data processing. Data is not persisted permanently to optimize performance.
Kafka is designed for real-time data processing and streaming, not for long-term storage.
Data is stored in Kafka for a configurable amount of time, after which it is automatically deleted.
Persisting data permanently would require additional storage and slow down performance.
Kafka's architecture allows for high throughput and low latenc...read more
Q24. Print Matrix in spiral form coding question
Print a matrix in spiral form
Iterate through the matrix in a spiral pattern, printing each element
Keep track of the boundaries of the matrix as you move along
Handle cases where the matrix is not a perfect square separately
Q25. Find the longest increasing decreasing subsequence in an array. hint- DP question
Use dynamic programming to find the longest increasing decreasing subsequence in an array.
Use dynamic programming to keep track of the length of the longest increasing subsequence ending at each index.
Similarly, keep track of the length of the longest decreasing subsequence starting at each index.
Combine the two to find the longest increasing decreasing subsequence.
Q26. difference between mango DB and Cassandra
MongoDB is a document-oriented database while Cassandra is a column-family database.
MongoDB is better suited for complex queries and data modeling.
Cassandra is better for write-heavy workloads and high availability.
MongoDB has a flexible schema while Cassandra has a fixed schema.
MongoDB supports ACID transactions while Cassandra supports eventual consistency.
MongoDB is more popular for web applications while Cassandra is more popular for IoT and real-time analytics.
Q27. Program to all paths in a binary matrix n*n
Program to find all paths in a binary matrix n*n
Use backtracking algorithm to explore all possible paths
Start from the top-left corner and explore all possible paths
Mark visited cells to avoid revisiting them
Terminate the search when all possible paths have been explored
Return all the valid paths found
Q28. How do you get issues resolved for the customer
I prioritize the issue based on severity, communicate with relevant teams, and provide regular updates to the customer.
Prioritize issues based on severity to ensure critical issues are resolved first
Communicate effectively with relevant teams to address the issue promptly
Provide regular updates to the customer on the progress of issue resolution
Q29. what is the use of Normalizations
Normalizations are used to standardize data by removing redundancies and inconsistencies.
Normalizations help in organizing data in a consistent and efficient manner.
They reduce data redundancy by eliminating duplicate information.
Normalization ensures data integrity and accuracy by avoiding inconsistencies.
Examples include normalizing database tables to reduce data duplication and improve query performance.
Q30. How do you segment your customers
Segment customers based on their needs, behavior, and demographics.
Segment based on customer needs and pain points
Segment based on customer behavior and usage patterns
Segment based on demographics such as age, location, industry, etc.
Q31. what is AWS SQS and
AWS SQS (Simple Queue Service) is a fully managed message queuing service that enables decoupling of components in a distributed system.
Used for storing messages in a queue before they are processed by a consumer
Supports distributed systems by enabling asynchronous communication between components
Helps in decoupling different parts of a system, improving scalability and fault tolerance
Messages can be stored in SQS for up to 14 days before being processed
Q32. Explain project framework
Project framework is a structure that provides guidelines, tools, and libraries for developing software applications.
Provides a foundation for organizing code and implementing best practices
Includes libraries, tools, and templates to streamline development process
Can be specific to a programming language or technology stack
Examples: Angular for front-end web development, Spring for Java applications
Q33. Explain waits in selenium
Waits in Selenium are used to make the automation script wait for a certain condition to be met before proceeding.
Implicit Wait: Waits for a certain amount of time before throwing an exception if the element is not found.
Explicit Wait: Waits for a certain condition to be met before proceeding.
Fluent Wait: Waits for a certain condition with a defined polling frequency.
Top HR Questions asked in Gerab National Enterprises
Interview Process at Gerab National Enterprises
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month