Capgemini
100+ Eternalight Infotech Interview Questions and Answers
You are given an array/list 'ARR' of size 'N'. You task is to find if there exists a triplet (i, j, k) such that 0 < i , i + 1 < j , j + 1 < k and k < 'N' - 1 and the sum of the subar...read more
Given a singly linked list of integers. Your task is to return the head of the reversed linked list.
For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked lis...read more
Write a program to find the factorial of a number.
Factorial of n is:
n! = n * (n-1) * (n-2) * (n-3)....* 1
Output the factorial of 'n'. If it does not exist, output 'Error'.
Input format :...read more
You have been given an integer array/list(ARR) of size N which contains numbers from 0 to (N - 2). Each number is present at least once. That is, if N = 5, the array/list constitutes values rangin...read more
You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change fo...read more
Given a text and a wildcard pattern of size N and M respectively, implement a wildcard pattern matching algorithm that finds if the wildcard pattern is matched with the text. The matchi...read more
Given an array ARR of N integers and an integer S. The task is to find whether there exists a subarray(positive length) of the given array such that the sum of elements of the subarray eq...read more
You are given a string 'STR'. The string contains [a-z] [A-Z] [0-9] [special characters]. You have to find the reverse of the string.
For example:
If the given string is: STR = "abcde". You h...read more
You have been given two strings A and B consisting of lower case English letters. The task is to count the minimum number of pre-processing moves on the string A required...read more
You are given 'N' rectangular buildings in a 2-dimensional city. Your task is to compute the skyline of these buildings, eliminating hidden lines return the skyline formed by these buildings ...read more
You have been given a binary tree of 'N' unique nodes and a Start node from where the tree will start to burn. Given that the Start node will always exist in the tree, your task is to print the...read more
You have a robot currently standing at the origin (0, 0) of a two-dimensional grid and facing north direction. You are given a sequence of moves for the robot in the form of a string of size 'N'. Y...read more
Pre-requisites: Anagrams are defined as words or names that can be formed by rearranging letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "r...read more
You will be given a stream of numbers, and you need to find the kth largest number in the stream at any given time.
As the stream of numbers can not be given during compile time, so you need to...read more
You are given a string S which represents a number. You have to find the smallest number strictly greater than the given number which contains the same set of digits as of the original number...read more
. What will be the output of the following pseudocode?
Integer i
Set i = 3
do
print i + 3
i = i - 1
while(i not equals 0)
end while
He asked me to explain my project in detail.
What are my three favorite core subjects?
Differentiate the classic waterfall model and iterative model.
What are the types of integrity constants in...read more
When does checkpoint occur in DBMS?
What are the unary operations in Relational Algebra?
What do you understand by Data Model?
There are 2 cup with 5 lt and 6 lt of water respectively. The objective is to pour exactly 9 lt of water in a bucket. How can it be accomplished?
Basic Apti qs were asked like
-Speed distance and time
- Work and time
- Profit loss
- Probability
- Percentage
What is a semaphore?
What is race condition?
Describe all the joins in SQL with a Venn diagram.
Q22. What is the advantage of generic collection, when and why we should approach for that?
Generic collections provide type safety and reusability in software development.
Generic collections allow us to store and manipulate objects of any type in a type-safe manner.
They provide compile-time type checking, reducing the chances of runtime errors.
They promote code reusability by allowing the same collection to be used with different types.
Generic collections improve performance by eliminating the need for boxing and unboxing operations.
They enable us to write cleaner ...read more
Currect location
Can you relocate
What's you future plans
Q24. what is array and how it is different from linked lists?
Array is a collection of elements of same data type. Linked list is a data structure where each element points to the next one.
Arrays have fixed size, linked lists can grow dynamically
Accessing elements in an array is faster than in a linked list
Inserting or deleting elements in a linked list is faster than in an array
Arrays are stored in contiguous memory locations, linked lists are not
Arrays are used for random access, linked lists are used for sequential access
Q25. What is the difference between one way SSL and two way SSL?
One way SSL is unidirectional while two way SSL is bidirectional.
One way SSL only authenticates the server to the client while two way SSL authenticates both the server and the client to each other.
One way SSL uses only server certificate while two way SSL uses both server and client certificates.
One way SSL is commonly used in websites while two way SSL is used in applications that require higher security such as online banking.
One way SSL is vulnerable to man-in-the-middle ...read more
Q26. What is multi thread,diff bwtn class and interface,what is abstract,what is constractor,compliler,jdk,oops concept,2Aptitude question,what is ur strenght,hobby.
Interview question for Software Developer covering topics like multi-threading, class vs interface, abstract, constructor, compiler, JDK, OOPs concepts, aptitude, strengths, and hobbies.
Multi-threading allows for concurrent execution of code
Classes are blueprints for objects while interfaces define a set of methods that a class must implement
Abstract classes cannot be instantiated and are meant to be extended by subclasses
Constructors are special methods used to initialize ob...read more
Q27. 1)What is oops? 2)difference between method overloading and method overriding? 3)what is static?
Answers to common questions asked in a software developer interview.
OOPs stands for Object-Oriented Programming which is a programming paradigm based on the concept of objects.
Method overloading is when multiple methods have the same name but different parameters, while method overriding is when a subclass provides its own implementation of a method that is already present in its parent class.
Static is a keyword used to create variables and methods that belong to a class rath...read more
Q28. How the login page comes when clicks on some webpage icon like facebook?
The login page is displayed when a user clicks on a webpage icon like Facebook by redirecting to a separate login page.
Clicking on the webpage icon triggers a redirect to the login page
The login page prompts the user to enter their credentials
After successful login, the user is redirected back to the original webpage
Q29. What is the difference between Soap and Rest?
SOAP is a protocol while REST is an architectural style for web services.
SOAP uses XML for messaging while REST uses JSON or XML.
SOAP requires more bandwidth and processing power than REST.
SOAP has built-in error handling while REST relies on HTTP error codes.
SOAP supports both stateful and stateless communication while REST is stateless.
SOAP is commonly used in enterprise applications while REST is used for web-based applications.
Example of SOAP: Web Services Description Lan...read more
Q30. difference between string , string buffer
String is immutable, String Buffer is mutable
String is immutable, meaning its value cannot be changed once it is created
String Buffer is mutable, meaning its value can be changed after it is created
String is faster and more memory efficient than String Buffer
String Buffer is synchronized, making it thread-safe for multiple operations
Q31. What are the important categaries of software?
The important categories of software are system software, application software, and programming software.
System software: manages computer hardware and provides common services for other software. Examples: operating systems, device drivers, firmware.
Application software: performs specific tasks for end-users. Examples: word processors, web browsers, video games.
Programming software: provides tools for software developers to create, debug, and maintain software. Examples: com...read more
Q32. How is public key different than private key?
Public key is used for encryption and private key is used for decryption.
Public key is shared with others to encrypt messages.
Private key is kept secret and used to decrypt messages.
Public key is used in digital signatures to verify authenticity.
Examples include RSA, DSA, and Elliptic Curve Cryptography.
Public key is longer than private key for added security.
Q33. How is public cloud different than private cloud?
Public cloud is accessible to everyone while private cloud is restricted to a specific organization.
Public cloud is owned and operated by third-party providers while private cloud is owned and operated by the organization itself.
Public cloud is accessible over the internet while private cloud is accessible only within the organization's network.
Public cloud is more cost-effective for small businesses while private cloud is more secure for large enterprises.
Examples of public ...read more
Q34. 1.input ="india" required output="nda"(removing duplicate i) using JAVA8 2.find second high number from array ={10,20,30,25} => output =25 Using java8
1. Remove duplicate 'i' from input string 'india' using Java8. 2. Find second highest number from array {10,20,30,25} using Java8.
For the first question, you can use Java8 streams to filter out the duplicate 'i' from the input string.
For the second question, you can use Java8 streams to sort the array in descending order and then get the second element.
Q35. Why do you use two mobile numbers
To separate personal and professional calls, and to ensure availability and accessibility.
Separate personal and professional calls
Ensure availability and accessibility
Maintain work-life balance
Avoid mixing personal and work-related contacts
Q36. Write a program in JavaScript for checking if someone is 18 years old or more, or if they are less than 18.
Program in JavaScript to check if someone is 18 years old or more.
Create a function that takes an age as input
Use an if statement to check if the age is greater than or equal to 18
Return 'You are 18 or older' if true, otherwise return 'You are under 18'
Q37. What is Class ? How You Will Use them in Coding
A class is a blueprint for creating objects in object-oriented programming. It defines the properties and behaviors of objects.
Classes are used to create objects with specific attributes and methods.
They help in organizing code by grouping related data and functions together.
Inheritance allows classes to inherit properties and methods from other classes.
Encapsulation ensures that data is kept private within a class.
Polymorphism allows objects of different classes to be treate...read more
Q38. How do we configure SSL at HTTP layer?
SSL can be configured at HTTP layer by enabling HTTPS protocol and configuring SSL certificates.
Enable HTTPS protocol in web server configuration
Generate or obtain SSL certificates
Configure SSL certificates in web server
Ensure secure communication between client and server
Test SSL configuration for any vulnerabilities
Q39. 1.In and array of string give me the string with longest length
The answer to the question is the string with the longest length in an array of strings.
Iterate through the array of strings and keep track of the string with the longest length.
Compare the length of each string with the current longest string and update it if necessary.
Return the string with the longest length.
Q40. What are the methods supported by REST?
REST supports methods like GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD.
GET - retrieves a resource
POST - creates a new resource
PUT - updates an existing resource
DELETE - deletes a resource
PATCH - partially updates a resource
OPTIONS - returns the supported methods for a resource
HEAD - returns metadata about a resource
Q41. What do you understand by Cloud?
Cloud refers to the delivery of computing services over the internet.
Cloud computing allows users to access data and applications from anywhere with an internet connection.
It offers scalability, flexibility, and cost-effectiveness compared to traditional on-premises computing.
Examples of cloud services include Amazon Web Services, Microsoft Azure, and Google Cloud Platform.
Q42. How to use multiple dispatch in redux?
Multiple dispatch is not a feature of Redux. It can be achieved using middleware or custom logic.
Middleware like redux-thunk or redux-saga can be used to dispatch multiple actions based on a single action.
Custom logic can be implemented in the reducer to handle multiple actions based on a single action type.
For example, a single 'ADD_ITEM' action can trigger multiple actions like 'UPDATE_TOTAL', 'UPDATE_HISTORY', etc.
Multiple dispatch can also be achieved using the 'redux-bat...read more
Q43. 1. Introduce yourself 2. How to fetch 50% record from table using SQL query
To fetch 50% records from a table using SQL query
Use the LIMIT clause to specify the number of records to return
Calculate 50% of the total records in the table to determine the limit value
Order the records in a specific way if needed before applying the LIMIT clause
Q44. What features of the tool you have worked on?
I have worked on a tool that includes features such as real-time collaboration, version control, and automated testing.
Real-time collaboration allows multiple users to work on the same project simultaneously.
Version control helps track changes made to the code and allows for easy rollback to previous versions.
Automated testing ensures that code changes do not introduce new bugs or issues.
Q45. What is the difference between string and string builder? Advantages of mvc?
String is immutable while StringBuilder is mutable. MVC provides separation of concerns and promotes code reusability.
String is a sequence of characters that cannot be modified once created.
StringBuilder is a mutable sequence of characters that can be modified without creating a new object.
Advantages of MVC include separation of concerns, code reusability, and easier maintenance.
MVC separates the application into three components: Model, View, and Controller.
Example: String s...read more
Q46. What is Interface, Why use them
An interface is a contract that specifies the methods that a class must implement. They are used to achieve abstraction and polymorphism.
Interfaces allow for loose coupling between classes
They provide a way to achieve multiple inheritance in Java
They are used to achieve abstraction and polymorphism
Interfaces are used to define a set of methods that a class must implement
They are commonly used in Java to define APIs
Q47. Write a program for circular link list. How toggle a bit reverse a string
Program for circular linked list, toggling a bit, and reversing a string.
Create a struct for node with data and next pointer for circular linked list
Implement functions to insert, delete, and display nodes in circular linked list
To toggle a bit, use XOR operator with 1
To reverse a string, use two pointers approach swapping characters from start and end
Q48. difference between list and tuple
List is mutable, tuple is immutable in Python.
List can be modified after creation, tuple cannot.
List uses square brackets [], tuple uses parentheses ().
List is used for collections of items that may change, tuple for fixed collections.
Example: list - [1, 2, 3], tuple - (1, 2, 3)
Q49. how to optimize the Db queries?
Optimizing Db queries involves using indexes, minimizing data retrieval, and avoiding unnecessary joins.
Use indexes on columns frequently used in WHERE clauses
Minimize data retrieval by selecting only necessary columns
Avoid unnecessary joins by denormalizing data when possible
Use query optimization tools like EXPLAIN in MySQL to analyze query performance
Q50. Give me an example of OAuth 2.0 in practical life?
OAuth 2.0 is used for secure authorization and authentication in various applications.
OAuth 2.0 is used by Google to allow third-party applications to access user data without sharing passwords.
It is used by Facebook to allow users to log in to other websites using their Facebook credentials.
It is used by Microsoft to allow users to grant access to their Office 365 data to third-party applications.
OAuth 2.0 is also used in mobile applications to authenticate users and access ...read more
Q51. What is Multithreading Deep copy shallow copy Merge two dictionaries
Multithreading is the ability of a CPU to execute multiple threads concurrently. Deep copy creates a new object with copies of the original object's data, while shallow copy creates a new object that references the original object's data. Merging two dictionaries combines the key-value pairs of two dictionaries into one.
Multithreading allows for concurrent execution of multiple threads on a CPU.
Deep copy creates a new object with copies of the original object's data, ensuring...read more
Q52. @Springbootapplicaton, Difference between @RestController and @Controller
In Spring Boot, @RestController is used for RESTful web services while @Controller is used for MVC applications.
RestController is used for RESTful web services, returning data directly in the response body
Controller is used for traditional MVC applications, returning a view
RestController is a specialized version of @Controller with @ResponseBody annotation
Example: @RestController is used for APIs that return JSON data, while @Controller is used for rendering HTML pages
Q53. what do you mean by Oops concepts
Oops concepts refer to Object-Oriented Programming principles like Inheritance, Encapsulation, Polymorphism, and Abstraction.
Inheritance allows a class to inherit properties and behavior from another class.
Encapsulation involves bundling data and methods that operate on the data into a single unit.
Polymorphism allows objects to be treated as instances of their parent class.
Abstraction hides the complex implementation details and only shows the necessary features to the outsid...read more
Q54. Thread implementation, difference between collection and collections
Thread implementation is a way to achieve multitasking in a program. Collection is an interface while Collections is a utility class in Java.
Thread implementation allows for concurrent execution in a program.
Collection is an interface in Java that represents a group of objects, while Collections is a utility class that provides static methods for operating on collections.
Example: List is a Collection interface, and Collections class provides methods like sort() and reverse() ...read more
Q55. What is Object and Encapsulation ?
Object is a collection of data and methods, while encapsulation is the concept of bundling data and methods within a single unit.
Object is an instance of a class that encapsulates data and behavior.
Encapsulation hides the internal state of an object and only allows access through methods.
Encapsulation helps in achieving data hiding, abstraction, and modularity.
Example: A car object can have data like color and speed, and methods like accelerate and brake.
Example: Encapsulatio...read more
Q56. What input files you have worked on?
I have worked on various input files including CSV, JSON, XML, and text files.
CSV files - Used for tabular data such as Excel spreadsheets.
JSON files - Used for storing and exchanging data.
XML files - Used for defining document structure and data.
Text files - Used for storing plain text data.
Q57. 1.In an array give me number closest to 100
Find the number closest to 100 in an array.
Iterate through the array and calculate the absolute difference between each number and 100.
Keep track of the minimum difference and the corresponding number.
Return the number with the minimum difference.
Q58. Write a code to call method from interface
Code to call a method from an interface
Create a class that implements the interface
Override the method in the class
Create an object of the class and assign it to the interface type
Call the method using the interface reference
Q59. what are idempotent http methods?
Idempotent HTTP methods are methods that can be called multiple times without different outcomes.
Idempotent methods do not have side effects on the server.
GET, PUT, and DELETE are examples of idempotent HTTP methods.
Idempotent methods are safe to retry in case of network failures.
Q60. What exception will occur in pl/,sql
Various exceptions can occur in PL/SQL, such as NO_DATA_FOUND, TOO_MANY_ROWS, and INVALID_CURSOR.
NO_DATA_FOUND exception is raised when a SELECT INTO statement returns no rows.
TOO_MANY_ROWS exception is raised when a SELECT INTO statement returns multiple rows.
INVALID_CURSOR exception is raised when an invalid cursor operation is performed.
Q61. Finding the Missing number in the program
Use XOR operation to find the missing number in an array of integers.
Iterate through the array and XOR all the elements with their indices.
Then XOR the result with the indices from 0 to n.
The final result will be the missing number.
Q62. For designing what tool you are using
I use various design tools such as Adobe XD, Sketch, Figma, and InVision for designing user interfaces.
Adobe XD
Sketch
Figma
InVision
Q63. What is the meaning of Salesforce
Salesforce is a cloud-based customer relationship management (CRM) platform that helps businesses manage their sales, customer service, marketing, and more.
Salesforce is a leading CRM software used by businesses to manage customer relationships and sales processes.
It provides a centralized platform for storing customer data, tracking interactions, and automating sales and marketing tasks.
Salesforce offers a range of tools and features, including sales forecasting, lead manage...read more
Q64. Tell me ES6 Features in javascript
ES6 features in JavaScript include arrow functions, classes, template literals, destructuring, and more.
Arrow functions provide a more concise syntax for writing functions.
Classes allow for easier object-oriented programming in JavaScript.
Template literals enable easier string interpolation and multiline strings.
Destructuring allows for easily extracting values from arrays or objects.
Let and const provide block-scoped variables, replacing var.
Q65. How to debug code basic oops concepts
Debugging code with basic OOPs concepts involves identifying and fixing errors in object-oriented programming code.
Identify the specific error or bug in the code by using debugging tools like breakpoints and print statements.
Check for common OOPs concepts like inheritance, encapsulation, polymorphism, and abstraction to ensure they are implemented correctly.
Use object-oriented design principles to refactor code for better organization and readability.
Test the code thoroughly ...read more
Q66. Difference between Future & Completable Future
Completable Future is an extension of Future in Java, providing more flexibility and control over asynchronous computations.
Completable Future can be manually completed or cancelled, while Future cannot.
Completable Future supports chaining of multiple asynchronous operations.
Completable Future allows handling exceptions using exceptionally() method.
Completable Future provides methods like thenApply(), thenAccept(), thenCombine() for composing asynchronous computations.
Q67. 4)what is java& feature of java?
Java is a popular programming language known for its portability and security features.
Java is an object-oriented language
It is platform-independent and can run on any device with a JVM
Java has automatic memory management through garbage collection
It has strong security features such as sandboxing and encryption
Java has a vast library of pre-built classes and APIs
Examples of Java-based applications include Android apps, enterprise software, and web applications
Q68. OSI model (Networking)?
The OSI model is a conceptual model that describes the communication functions of a telecommunication or computing system.
The OSI model has 7 layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
Each layer has a specific function and communicates with the layers above and below it.
The Physical layer deals with the physical transmission of data, while the Application layer deals with user interfaces and applications.
Examples of protocols that...read more
Q69. What is Abstract Class
Abstract class is a class that cannot be instantiated and is used as a base class for other classes.
An abstract class can have abstract and non-abstract methods.
Abstract methods have no implementation and must be implemented by the derived class.
An abstract class can have constructors and fields.
An abstract class can be used to define a common interface for a group of related classes.
Example: Animal is an abstract class and Dog, Cat, and Bird are derived classes that inherit ...read more
Q70. Write an ordered list & unordered list in HTML.
HTML ordered and unordered list example
Use <ol> tag for ordered list
Use <ul> tag for unordered list
Use <li> tag for each list item
Example: <ol><li>Item 1</li><li>Item 2</li></ol>
Example: <ul><li>Item A</li><li>Item B</li></ul>
Q71. Explain Oops Concept?
OOPs is a programming paradigm based on the concept of objects, which can contain data and code.
OOPs stands for Object-Oriented Programming.
It focuses on creating objects that interact with each other to solve a problem.
It has four main concepts: Encapsulation, Inheritance, Polymorphism, and Abstraction.
Encapsulation is the process of hiding data and methods within a class.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allows obje...read more
Q72. How to design database structure
Database structure design involves identifying entities, relationships, attributes, and normalization.
Identify entities and their relationships
Define attributes for each entity
Normalize the database to reduce redundancy
Consider indexing for efficient querying
Use primary and foreign keys to establish relationships
Choose appropriate data types for each attribute
Q73. what is object ?what is oops
An object is an instance of a class in object-oriented programming. OOPs stands for Object-Oriented Programming System.
An object is a real-world entity that has state and behavior.
Objects are instances of classes, which define their structure and behavior.
OOPs is a programming paradigm based on the concept of objects.
Encapsulation, inheritance, polymorphism, and abstraction are key principles of OOPs.
Example: A car can be an object with properties like color, model, and behav...read more
Q74. String buffer and string boot difference
String buffer is mutable while string builder is not. String builder is faster but not thread-safe.
String buffer is synchronized and thread-safe, while string builder is not.
String builder is faster than string buffer because it is not synchronized.
String buffer is mutable, meaning it can be changed after creation, while string builder is immutable.
Example: StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();
Q75. What is Reactjs What is DOM Closures Promises
Reactjs is a JavaScript library for building user interfaces. DOM is a programming interface for web documents. Closures and Promises are JavaScript concepts.
Reactjs is a popular JavaScript library for building interactive user interfaces.
DOM stands for Document Object Model, which is a programming interface for web documents.
Closures in JavaScript allow functions to retain access to variables from their containing scope even after the scope has closed.
Promises are objects re...read more
Q76. what is servlet implement code
Servlet implement code is the code that defines the behavior of a servlet in a Java web application.
Servlet implement code is written in Java and typically extends the HttpServlet class.
It includes methods like doGet() and doPost() to handle HTTP GET and POST requests.
Servlet implement code can interact with databases, process form data, and generate dynamic web content.
Q77. what is rdbms and use
RDBMS stands for Relational Database Management System. It is a type of database management system that stores data in a structured format.
Organizes data into tables with rows and columns
Uses SQL for querying and managing data
Enforces relationships between tables using foreign keys
Examples include MySQL, PostgreSQL, Oracle
Q78. what is microservies anduse
Microservices are a software development technique where applications are broken down into smaller, independent services that communicate with each other.
Each microservice is responsible for a specific function or feature
Microservices can be developed, deployed, and scaled independently
Communication between microservices is typically done through APIs
Examples: Netflix, Amazon, Uber
Q79. What is OAuth 2.0?
OAuth 2.0 is an authorization framework that allows third-party applications to access user data without sharing passwords.
OAuth 2.0 is used for authentication and authorization.
It allows users to grant access to their resources stored on one site to another site.
It uses access tokens to grant access to resources.
Examples of OAuth 2.0 providers include Google, Facebook, and Twitter.
Q80. 1. why string is immutable
String is immutable because it ensures data integrity, thread safety, and allows for efficient memory management.
Immutable strings prevent accidental modification of data.
Immutable strings can be safely shared across multiple threads.
Immutable strings allow for efficient memory management by reusing existing string instances.
Immutable strings enable the use of string interning for better performance.
Immutable strings facilitate the implementation of hash-based data structures...read more
Q81. Explain OSI model modules?
The OSI model is a conceptual model that characterizes and standardizes the communication functions of a telecommunication or computing system.
The OSI model has 7 layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
Each layer has a specific function and communicates with the layers above and below it.
The Physical layer deals with the physical transmission of data, while the Application layer deals with user interfaces and application proces...read more
Q82. What are pipes in angular?
Pipes in Angular are used for transforming data in templates.
Pipes are used to format data before displaying it in the view.
Angular provides built-in pipes like date, currency, uppercase, lowercase, etc.
Custom pipes can also be created for specific formatting needs.
Pipes can be chained together for multiple transformations.
Example: {{ birthday | date:'MM/dd/yyyy' }}
Q83. collection and type of collection in jva
Java provides various types of collections like List, Set, Map, Queue, etc.
Java collections framework provides interfaces and classes to store and manipulate groups of objects.
Some common types of collections in Java are ArrayList, LinkedList, HashSet, HashMap, PriorityQueue, etc.
Collections in Java can be used to store and manipulate data in a structured way.
Collections provide methods to add, remove, search, and iterate over elements efficiently.
Q84. what is filter in java 8
Filter in Java 8 is a method used to iterate through a collection and filter out elements based on a specified condition.
Filter is a method in the Stream interface in Java 8.
It takes a Predicate as an argument to specify the condition for filtering.
Example: List
names = Arrays.asList("Alice", "Bob", "Charlie"); List filteredNames = names.stream().filter(name -> name.startsWith("A")).collect(Collectors.toList());
Q85. Postgres query for, group by operation.
Postgres query for grouping data based on a specific column.
Use the GROUP BY clause in your query
Specify the column you want to group by in the GROUP BY clause
Aggregate functions like COUNT, SUM, AVG can be used with GROUP BY
Example: SELECT column_name, COUNT(*) FROM table_name GROUP BY column_name
Q86. write jwt implementation methods
JWT implementation methods involve encoding, decoding, and verifying tokens for secure authentication.
Use a library like jsonwebtoken to easily create and verify JWT tokens
When creating a token, include a payload with user information and a secret key for signing
To verify a token, decode it using the secret key and check the signature
Q87. Talk about non-technical topic for 3 min
Discussing the impact of social media on mental health
Social media can have both positive and negative effects on mental health
Excessive use of social media can lead to feelings of inadequacy and low self-esteem
However, social media can also provide a sense of community and support for individuals going through tough times
Q88. What is SPA in software
SPA stands for Single Page Application, a web application that loads a single HTML page and dynamically updates as the user interacts with it.
SPA loads a single HTML page initially and updates content dynamically without reloading the entire page
Uses AJAX to fetch data from the server and update the page without refreshing
Improves user experience by providing faster navigation and smoother interactions
Examples include Gmail, Facebook, and Google Maps
Q89. What is a class?
A class is a blueprint for creating objects in object-oriented programming.
Defines the properties and behaviors of objects
Can be used to create multiple instances of objects
Encapsulates data and methods within a single unit
Q90. What is an object?
An object is a self-contained entity that consists of data and methods to manipulate that data.
Objects are instances of classes in object-oriented programming.
They have attributes (data) and methods (functions) to operate on the data.
Objects can interact with each other through method calls.
Example: In a car simulation program, a 'Car' object may have attributes like 'color' and 'speed', and methods like 'accelerate' and 'brake'.
Q91. What are data structures
Data structures are ways to organize and store data in a computer so that it can be accessed and used efficiently.
Data structures define how data is stored, accessed, and manipulated in a computer program.
Examples include arrays, linked lists, stacks, queues, trees, and graphs.
Choosing the right data structure is crucial for optimizing performance and memory usage in software development.
Q92. Can deactivate in Angular
Yes, you can deactivate in Angular using the ngIf directive.
Use ngIf directive to conditionally show or hide elements in Angular templates.
Set the condition to false to deactivate the element.
Example:
Content
Q93. what is oops concets
Object-oriented programming concepts that focus on classes and objects.
Encapsulation: Bundling data and methods that operate on the data into a single unit (class).
Inheritance: Ability of a class to inherit properties and behavior from another class.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation details and showing only the necessary features.
Example: Class 'Car' with properties like 'color' and meth...read more
Q94. explain Polymorphism with examples
Polymorphism is the ability of an object to take on many forms. It allows objects of different classes to be treated as the same type.
Polymorphism allows a single interface to be used for different types of objects.
It helps in achieving code reusability and flexibility.
Polymorphism can be achieved through method overriding and method overloading.
Example: A 'Shape' class can have different subclasses like 'Circle', 'Rectangle', and 'Triangle', all implementing a 'draw' method.
Q95. What is View in Sql?
View in SQL is a virtual table that is based on the result-set of an SQL statement.
A view is a stored SELECT statement that can be used as a table.
It is used to simplify complex queries and to hide the complexity of underlying tables.
Views can be used to restrict access to sensitive data.
They do not store data themselves, but rather retrieve data from one or more tables.
Views can be created using the CREATE VIEW statement.
Q96. Java opps concept and implementation
Java OOPs concepts refer to the principles of Object-Oriented Programming and their implementation in Java.
Java OOPs concepts include inheritance, encapsulation, polymorphism, and abstraction.
Inheritance allows a class to inherit properties and behavior from another class.
Encapsulation involves bundling data and methods that operate on the data into a single unit.
Polymorphism allows objects to be treated as instances of their parent class.
Abstraction involves hiding the imple...read more
Q97. What are Constraints in Oracle
Constraints in Oracle are rules that limit the type of data that can be inserted or updated in a table.
Constraints ensure data integrity and consistency.
Types of constraints include NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK constraints.
NOT NULL constraint ensures that a column cannot have a NULL value.
UNIQUE constraint ensures that each value in a column is unique.
PRIMARY KEY constraint ensures that each row in a table is uniquely identified.
FOREIGN KEY constraint...read more
Q98. string concat operation output
The question is about the output of a string concatenation operation.
The output of a string concatenation operation is a new string that combines the original strings.
The order of the strings in the concatenation operation determines the order in the output.
The concatenation operator in most programming languages is the plus sign (+).
Q99. what is virtual dom
Virtual DOM is a lightweight copy of the actual DOM used for efficient updates in web development.
Virtual DOM is a concept used in frameworks like React to improve performance by minimizing actual DOM updates.
Changes are first made to the virtual DOM, which is then compared to the actual DOM to determine the minimal updates needed.
This process helps in reducing the number of manipulations required on the real DOM, leading to faster rendering.
Virtual DOM allows for efficient b...read more
Q100. Delegate in csharp and example
Delegate in C# allows a method to be passed as a parameter or assigned to a variable.
Delegates are similar to function pointers in C++.
Delegates can be used to create callback functions.
Example: defining a delegate, assigning a method to it, and invoking the delegate.
More about working at Capgemini
Top HR Questions asked in Eternalight Infotech
Interview Process at Eternalight Infotech
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month