Filter interviews by
I applied via Approached by Company
Algorithm is must required and strong database.
Top trending discussions
I applied via Company Website and was interviewed in Sep 2023. There were 2 interview rounds.
HashMap is a data structure in Java that stores key-value pairs and allows fast retrieval of values based on keys.
HashMap implements the Map interface in Java
It allows null keys and values
Keys in a HashMap must be unique
Example: HashMap
HashMap is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values.
HashMap internally uses an array of linked lists to store key-value pairs.
When a key-value pair is added, the key is hashed to determine the index in the array where it will be stored.
If multiple keys hash to the same index, a linked list is used to handle collisions.
HashMap uses the hashCode() method of keys to calc...
Throw is used to explicitly throw an exception in a method, while Throws is used to declare the exceptions that a method may throw.
Throw is used within a method to throw an exception explicitly.
Throws is used in the method signature to declare the exceptions that the method may throw.
Throw is followed by an instance of Throwable class, while Throws is followed by the exception class names separated by commas.
Example: t...
Arrays are fixed in size, while ArrayLists can dynamically resize. ArrayLists provide more flexibility and functionality.
Arrays have a fixed size, while ArrayLists can dynamically resize.
ArrayLists can easily add, remove, or modify elements, while arrays require manual shifting of elements.
Arrays use [] syntax for declaration and initialization, while ArrayLists use the ArrayList class from the Java Collections framewo
ArrayList is resizable array implementation, LinkedList is doubly linked list implementation, Vector is synchronized version of ArrayList.
ArrayList is faster for accessing elements, LinkedList is faster for adding/removing elements in middle.
ArrayList uses less memory than LinkedList due to contiguous memory allocation.
Vector is thread-safe but slower than ArrayList due to synchronization overhead.
Iterate through a hashmap using an iterator in Java
Create an iterator using the entrySet() method of the hashmap
Use a while loop to iterate through the hashmap entries
Access the key and value of each entry using the getKey() and getValue() methods
I applied via Campus Placement
It was an easy test. Multiple choice questions bases on java
3 questions all DSA trees graphs
To find the middle of a linked list, use the two-pointer approach.
Initialize two pointers, slow and fast, pointing to the head of the linked list.
Move the slow pointer one step at a time and the fast pointer two steps at a time.
When the fast pointer reaches the end of the list, the slow pointer will be at the middle.
Curd operation with SQL connectivity
I applied via Naukri.com and was interviewed in Apr 2022. There were 3 interview rounds.
Programs using core java
I was interviewed in Jul 2021.
Round duration - 180 Minutes
Round difficulty - Medium
How can you traverse the DOM with JavaScript?
What is the box model?
What are NoSQL databases? What are the different types of NoSQL databases?
Also there was 2 coding questions.
We will iterate over ARR and find the MAX and MIN of the ARR. And if the MAX - MIN is odd the return “ODD” else return "EVEN".
The algorithm will be-
O(1).
Since constant space is used.
Time Complexity: O(n)Explanation:O(N), where N ...
Tip 1 : Do atleast 2 projects
Tip 2 : Complete competitive programming
Tip 3 : Practice more interview Questions particular to the company applying to
Tip 1 : Don't lie on resume
Tip 2 : Try to wrap resume in one page
I applied via Naukri.com and was interviewed in May 2021. There were 4 interview rounds.
OOPs concepts are the fundamental principles of object-oriented programming.
Abstraction: hiding implementation details
Encapsulation: binding data and methods together
Inheritance: creating new classes from existing ones
Polymorphism: using a single interface to represent multiple entities
Objects: instances of classes with their own state and behavior
I have used various tools including Eclipse, IntelliJ IDEA, Maven, Git, JIRA, and Jenkins.
Eclipse - for Java development and debugging
IntelliJ IDEA - for Java development and debugging
Maven - for project management and build automation
Git - for version control and collaboration
JIRA - for issue tracking and project management
Jenkins - for continuous integration and deployment
I applied via Naukri.com and was interviewed in Apr 2021. There was 1 interview round.
finally is used to execute a block of code after try-catch block, while static block is executed when class is loaded.
finally block is used to perform cleanup operations like closing database connections, file streams etc.
static block is used to initialize static variables or perform any other static initialization.
finally block is always executed whether an exception is thrown or not, while static block is executed on...
The @Autowired annotation in Spring is used to automatically wire dependencies into a bean.
It eliminates the need for manual wiring of dependencies
It can be used to inject dependencies into constructors, fields, and methods
It can be used with other annotations like @Qualifier and @Value
It can be used with both XML and Java-based configurations
To make a class immutable in Java, we need to follow certain guidelines.
Make the class final
Make all fields private and final
Do not provide setter methods
If the field is mutable, return a clone of it instead of the original object
Ensure that any mutable objects passed to the constructor are not modified outside the class
Collections are data structures that store and manipulate groups of objects.
Collections provide a way to manage and manipulate groups of objects
Java provides several built-in collection classes such as ArrayList, LinkedList, HashSet, etc.
Collections can be used to perform operations like searching, sorting, filtering, etc.
Collections can store objects of any type, including primitive types and user-defined classes
ArrayList and Vector are similar but Vector is synchronized while HashMap and HashTable are both key-value pair data structures but HashTable is synchronized.
ArrayList and Vector both implement List interface but Vector is thread-safe while ArrayList is not.
Vector is slower than ArrayList due to synchronization.
HashMap and HashTable both store key-value pairs but HashTable is thread-safe while HashMap is not.
HashMap al...
Rest Api is a web service that uses HTTP methods to access and manipulate data.
Rest stands for Representational State Transfer
It is an architectural style for building web services
Uses HTTP methods like GET, POST, PUT, DELETE
Data is transferred in JSON or XML format
Examples: Twitter API, Facebook Graph API
Program to add numbers in harmonic series (1+1/2+1/3+...+1/n)
Create a variable to store the sum
Use a loop to iterate through the series up to n
Add each term to the sum
Print the sum
I applied via Naukri.com and was interviewed in Dec 2020. There was 1 interview round.
Batchable interface has three methods: start(), execute(), and finish().
start() method is used to initialize the batch job and return the query locator.
execute() method is used to process the records returned by the query locator.
finish() method is used to perform any final operations after the batch job completes.
Access modifiers in Apex control the visibility and accessibility of classes, methods, variables, and interfaces.
There are three access modifiers in Apex: private, public, and global.
Private access modifier restricts access to only within the defining class.
Public access modifier allows access from any other class or trigger.
Global access modifier allows access from any Apex code in any Salesforce organization.
Access m...
There are multiple ways to write asynchronous code in Salesforce.
Using @future annotation
Using Queueable interface
Using Batch Apex
Using Platform Events
Using Asynchronous Apex REST Callouts
Order of Execution in Salesforce determines the sequence of events that occur when a record is saved.
Validation rules are executed first
Before triggers are executed next
Custom validation rules are executed after before triggers
After triggers are executed next
Assignment rules are executed after after triggers
Workflows are executed after assignment rules
Escalation rules are executed after workflows
Finally, the record is
Annotations are used in Salesforce to add metadata to classes, methods, and variables.
Annotations are used to provide additional information to the compiler or runtime engine.
They can be used to control the behavior of code, such as enforcing security or limiting access.
Examples of annotations include @AuraEnabled, @TestSetup, and @Deprecated.
Annotations can also be used to provide documentation for code, such as @desc...
Coding best practices ensure efficient, maintainable, and scalable code.
Use meaningful variable and function names
Follow a consistent coding style
Write modular and reusable code
Use version control
Write unit tests
Optimize code for performance
Document code and add comments
TCS
Accenture
Wipro
Cognizant