Filter interviews by
I applied via Naukri.com and was interviewed in Oct 2021. There was 1 interview round.
Printing odd and even numbers in sequence using threads.
Create two threads, one for odd and one for even numbers.
Use a shared variable to keep track of the current number.
Use synchronized block to ensure only one thread is executing at a time.
Use wait() and notify() methods to signal the other thread.
Terminate the threads when the desired number of iterations is reached.
Explaining CopyOnWriteArrayList and difference between synchronized and concurrent collections.
CopyOnWriteArrayList is a thread-safe variant of ArrayList where all mutative operations are implemented by making a new copy of the underlying array.
Synchronized collections use a single lock to synchronize access to the collection, while concurrent collections use multiple locks to allow concurrent access.
Concurrent collect...
Program to find largest number in array with increasing then decreasing numbers.
Find the peak element in the array using binary search.
If peak element is at index 0 or last index, return it.
Else, search for largest element in left and right subarrays.
HashMap is a data structure that stores key-value pairs and uses hashcode and equals methods for efficient retrieval.
HashMap uses hashcode to generate an index for the key-value pair
If two keys have the same hashcode, equals method is used to check for equality
If equals method returns true, the value associated with the key is returned
If equals method returns false, a collision occurs and the key-value pair is stored i
I was interviewed in Oct 2024.
JWT token is a JSON web token used for authentication and contains three parts: header, payload, and signature.
JWT token consists of three parts: header, payload, and signature.
Header contains the type of token and the signing algorithm used.
Payload contains claims about the user and additional data.
Signature is used to verify that the sender of the JWT is who it says it is.
JWT tokens are encoded and can be easily deco...
I applied via Indeed and was interviewed in Jul 2024. There was 1 interview round.
Objects of String are stored in the String Pool in Java.
String objects are stored in the String Pool, a special memory area in Java heap memory.
String literals are automatically stored in the String Pool.
String objects created using the new keyword are not stored in the String Pool.
String.intern() method can be used to store a String object in the String Pool.
A bean in Spring Boot is a Java object that is instantiated, assembled, and managed by the Spring IoC container.
Beans are defined in the Spring configuration file or using annotations like @Component, @Service, @Repository, etc.
Beans are singleton by default but can be scoped as prototype, request, session, etc.
Beans are injected into other beans using dependency injection.
Example: @Component annotation is used to defi
Query parameters are used to pass data to a web server through the URL, while path parameters are part of the URL itself.
Query parameters are key-value pairs added to the end of a URL after a '?'
Path parameters are variables within the URL path itself, denoted by curly braces {}
Example of query parameter: www.example.com/api/users?id=123
Example of path parameter: www.example.com/api/users/{userId}
Exceptions are recoverable errors that can be handled in code, while errors are unrecoverable issues that usually result in program termination.
Exceptions are checked at compile time, while errors are unchecked.
Exceptions are subclasses of Throwable, while errors are subclasses of Error.
Examples of exceptions include FileNotFoundException, NullPointerException, while examples of errors include OutOfMemoryError, StackOv
MCQ test consisting of 70 mcqs in 75 minutes from aptitude english and cs fundamentals. If cleared next paper 2 coding qs medium level
I faced challenges with integrating third-party APIs and debugging complex logic.
Difficulty in understanding and implementing third-party APIs
Issues with data synchronization between different systems
Troubleshooting complex logic errors
Managing dependencies and version conflicts
Time constraints affecting problem-solving
posted on 22 Oct 2024
Transactions in microservices are managed using distributed transactions or compensating transactions.
Distributed transactions involve multiple microservices coordinating with a transaction manager to ensure data consistency across services.
Compensating transactions involve each microservice having a compensating action to rollback changes if a transaction fails.
Saga pattern is commonly used in microservices to manage ...
I applied via Company Website and was interviewed in Aug 2024. There was 1 interview round.
Use streams to find prime numbers in an array
Use Java streams to filter out non-prime numbers from the array
Check if a number is prime by dividing it by all numbers less than its square root
Create a method to check if a number is prime
posted on 1 Oct 2024
I applied via Campus Placement
DP graphs strings it was good
Reverse a linked list by changing the direction of pointers
Start with three pointers: current, previous, and next
Iterate through the list, updating pointers to reverse the direction
Return the new head of the reversed list
The Fibonacci series is a sequence of numbers where each number is the sum of the two preceding ones.
Start with two variables initialized to 0 and 1
Loop through desired number of iterations, adding the previous two numbers to get the next number
Print or store each number in the series
I applied via Company Website and was interviewed in Jun 2024. There was 1 interview round.
Checked exceptions are exceptions that must be either caught or declared in the method signature, while unchecked exceptions do not need to be caught or declared.
Checked exceptions are subclasses of Exception class, excluding RuntimeException and Error.
Checked exceptions are checked at compile time, so the compiler forces the programmer to handle them.
Unchecked exceptions are subclasses of RuntimeException and Error cl...
Spring is a framework for building Java applications, while SpringBoot is a tool that simplifies the setup and configuration of Spring applications.
Spring is a comprehensive framework that provides various modules for different functionalities like dependency injection, aspect-oriented programming, etc.
SpringBoot is an opinionated tool that simplifies the setup and configuration of Spring applications by providing defa...
Easy medium and hard questions
Normalization in DBMS is the process of organizing data in a database to reduce redundancy and improve data integrity.
Normalization involves breaking down a database into smaller, more manageable tables and defining relationships between them.
It helps in reducing data redundancy by storing data in a structured and organized manner.
Normalization also helps in improving data integrity by ensuring that data is consistent ...
Some of the top questions asked at the Morgan Stanley Java Software Developer interview -
Associate
2.9k
salaries
| ₹5.2 L/yr - ₹19.5 L/yr |
Senior Manager
2.5k
salaries
| ₹15.9 L/yr - ₹54 L/yr |
Manager
1.9k
salaries
| ₹10.6 L/yr - ₹42 L/yr |
Senior Associate
1.4k
salaries
| ₹7 L/yr - ₹25.5 L/yr |
Vice President
1.2k
salaries
| ₹20.7 L/yr - ₹80 L/yr |
JPMorgan Chase & Co.
Goldman Sachs
TCS
Deloitte