i
10405090xyzabc
Filter interviews by
I was interviewed in Feb 2025.
ArrayList offers fast access and is memory efficient, while LinkedList excels in insertions and deletions.
ArrayList allows O(1) access time, making it ideal for frequent retrievals. Example: Accessing elements in a list of user IDs.
LinkedList provides O(1) time for insertions/deletions at both ends. Example: Implementing a queue where elements are frequently added/removed.
Memory overhead in LinkedList is higher due to ...
== checks reference equality; .equals() checks value equality, can be overridden for custom comparison.
== compares memory addresses, while .equals() compares actual content.
Example: new String("hello") == new String("hello") returns false.
"hello".equals("hello") returns true.
Wrapper classes like Integer cache small values, affecting == behavior.
Override equals() when logical equality is needed, e.g., in custom classes.
...
Lambda expressions enhance Java code by making it more concise, readable, and easier to maintain through functional programming.
Conciseness: Lambda expressions reduce boilerplate code. For example, instead of writing an anonymous class for a Runnable, you can use: `Runnable r = () -> System.out.println("Hello");`
Readability: They allow for clearer expression of intent. For instance, using `list.forEach(item -> Sy...
Checked exceptions require handling; unchecked exceptions do not. Custom exceptions can be either, based on use case.
Checked exceptions must be handled with try-catch or declared with throws.
Examples of checked exceptions: IOException, SQLException.
Unchecked exceptions do not require explicit handling.
Examples of unchecked exceptions: NullPointerException, ArithmeticException.
Use checked exceptions for recoverable cond...
The Java Memory Model defines thread interaction with memory, ensuring visibility and ordering in multithreaded environments.
JMM specifies how threads interact with shared variables, ensuring visibility and ordering.
Volatile keyword ensures that changes to a variable are visible to all threads immediately.
Synchronized blocks provide mutual exclusion, preventing multiple threads from accessing critical sections simultan...
Method overloading allows same method name with different parameters; overriding allows subclass to redefine parent method.
Method Overloading: Same method name, different parameters (e.g., `int add(int a, int b)` and `double add(double a, double b)`)
Method Overriding: Subclass provides specific implementation of a method defined in its superclass (e.g., `void display()` in parent and `void display()` in child)
Overloadi...
Functional interfaces in Java enable lambda expressions for concise implementation of single abstract methods.
A functional interface has exactly one abstract method, e.g., Runnable, Callable.
Lambda expressions provide a shorthand way to implement functional interfaces, e.g., () -> System.out.println("Hello").
Functional interfaces can have multiple default or static methods, allowing for added functionality without b...
Java Streams enable functional operations on collections with lazy evaluation, differing from Iterators in several key aspects.
Streams support functional-style operations like filter(), map(), and reduce() for cleaner code.
Example: list.stream().filter(x -> x > 10).collect(Collectors.toList()) filters elements greater than 10.
Streams are not reusable; once consumed, they cannot be used again.
Iterators can be rese...
Immutability in Java ensures objects cannot be modified after creation, enhancing thread safety and reducing side effects.
Immutable objects cannot be changed once created, e.g., String class in Java.
Thread-safe: Since they cannot be modified, they prevent issues in multi-threaded environments.
Prevent unintended side effects, making code easier to understand and maintain.
To create an immutable class, use final fields an...
Java annotations provide metadata for classes, enhancing readability and reducing boilerplate in frameworks like Spring.
Annotations like @Component and @Service simplify bean management in Spring.
Dependency injection is streamlined with @Autowired, reducing manual wiring.
Custom annotations can encapsulate repetitive configurations, improving code clarity.
Annotations like @Transactional manage database transactions decl...
Java Streams enable parallel processing using ForkJoin framework, but have pitfalls like race conditions and performance issues with small datasets.
Use parallel streams for CPU-intensive tasks to leverage multiple cores effectively.
Avoid using parallel streams for small datasets as overhead may outweigh benefits.
Be cautious of shared mutable state to prevent race conditions; prefer immutable data structures.
Use forEach...
I was interviewed in Feb 2025.
I was interviewed in Feb 2025.
I was interviewed in Feb 2025.
10405090xyzabc interview questions for popular designations
I am writing automation and clicking on aptitude test.
I am writing automation and clicking on assignment test.
This is an automation test. I got this task from my senior. I'm doing good.
I was interviewed in Feb 2025.
== checks reference equality, while .equals() checks value equality. Override equals() for custom comparison logic.
== compares memory addresses, while .equals() compares actual content.
Example: new String("hello") == new String("hello") returns false, but "hello".equals("hello") returns true.
For wrapper classes like Integer, small values (-128 to 127) are cached, affecting == behavior.
Override equals() when logical equ...
Java's garbage collector automatically manages memory, reclaiming space from unused objects through various algorithms.
Garbage collection in Java is automatic, freeing developers from manual memory management.
The JVM uses different GC algorithms: Serial, Parallel, CMS, and G1 GC, each with unique characteristics.
Memory is divided into regions: Young Generation (short-lived objects), Old Generation (long-lived objects),...
Lambda expressions enhance Java code readability and maintainability by simplifying syntax and promoting functional programming.
Concise Syntax: Lambda expressions reduce boilerplate code. Example: Instead of writing an anonymous class for Runnable, use () -> System.out.println("Hello").
Improved Readability: Code becomes more expressive. Example: list.forEach(item -> System.out.println(item)) is clearer than using...
Checked exceptions require handling, while unchecked exceptions indicate programming errors. Custom exceptions can be either type.
Checked exceptions must be handled with try-catch or declared with throws.
Examples of checked exceptions: IOException, SQLException.
Unchecked exceptions do not require explicit handling.
Examples of unchecked exceptions: NullPointerException, ArithmeticException.
Use checked exceptions for exp...
The Java Memory Model defines thread interactions with memory, ensuring visibility and ordering in multithreaded environments.
JMM specifies how threads interact with shared variables, ensuring visibility and ordering.
Volatile keyword ensures that changes to a variable are visible to all threads immediately.
Synchronized blocks provide mutual exclusion, preventing multiple threads from accessing a block simultaneously.
Wi...
Method overloading allows same method name with different parameters; overriding allows subclass to redefine parent method.
Method Overloading: Same method name, different parameters (e.g., int add(int a, int b) vs. double add(double a, double b)).
Method Overriding: Subclass provides specific implementation of a method defined in its superclass (e.g., class Animal has method sound(), class Dog overrides it).
Overloading ...
Functional interfaces in Java enable concise lambda expressions and API evolution without breaking changes.
A functional interface has exactly one abstract method, e.g., Runnable, Callable.
Lambda expressions provide a shorthand way to implement functional interfaces.
Functional interfaces can have multiple default or static methods.
The @FunctionalInterface annotation ensures only one abstract method is present.
Method ref...
Java Streams enable functional operations on collections with lazy evaluation, differing from Iterators in several key aspects.
Streams support functional-style operations like filter, map, and reduce, while Iterators use imperative style.
Example: stream.filter(x -> x > 10) filters elements greater than 10, while Iterator requires manual checks.
Streams are not reusable; once consumed, they cannot be used again, un...
Immutability in Java ensures objects cannot be modified after creation, enhancing thread safety and consistency.
Immutable objects cannot be changed after creation, e.g., String class.
Thread-safe: Multiple threads can access immutable objects without synchronization issues.
Prevents unintended side effects in multi-threaded applications.
To create an immutable class, use final fields and avoid setters.
Collections can be m...
final, finally, and finalize serve different purposes in Java: constants, cleanup, and garbage collection respectively.
final: Used to declare constants. Example: final int MAX_VALUE = 100;
final: Prevents method overriding. Example: final void display() {}
final: Prevents inheritance. Example: final class Constants {}
finally: Executes after try-catch for cleanup. Example: try { ... } catch { ... } finally { closeResource...
Java annotations provide metadata for classes, enhancing code readability and maintainability, especially in frameworks like Spring.
Annotations like @Component and @Service in Spring simplify bean management and dependency injection.
Built-in annotations such as @Override and @Deprecated help clarify code intent and maintain compatibility.
Custom annotations can encapsulate repetitive configurations, reducing boilerplate...
Java Streams enable parallel processing using ForkJoin framework, but have pitfalls like race conditions and debugging challenges.
Use parallel streams for CPU-intensive tasks to leverage multiple cores effectively.
Avoid using parallel streams for small datasets as overhead may outweigh benefits.
Be cautious of shared mutable state to prevent race conditions; prefer immutable data structures.
Use 'forEachOrdered()' for or...
I was interviewed in Feb 2025.
I was interviewed in Feb 2025.
ArrayList is a resizable array, while LinkedList is a doubly linked list. Choose based on performance needs.
ArrayList: Faster for random access (O(1)). Example: list.get(5);
LinkedList: Faster for insertions/deletions (O(1)) at both ends. Example: list.addFirst('A');
ArrayList: Uses less memory overhead compared to LinkedList.
LinkedList: Better for frequent insertions/deletions in the middle of the list.
ArrayList: Requir...
Java's synchronized keyword provides thread safety but has limitations compared to ReentrantLock.
Advantages of synchronized: Simple to use, built-in language feature.
Disadvantages of synchronized: Can lead to thread contention, no timeout options.
ReentrantLock allows more flexibility: supports tryLock(), lockInterruptibly().
ReentrantLock can be more efficient in high contention scenarios.
Example of synchronized: synchr...
== checks reference equality, while .equals() checks value equality in Java. Use .equals() for content comparison.
== compares object references (memory addresses). Example: String a = new String('test'); String b = new String('test'); a == b returns false.
.equals() compares actual content of objects. Example: a.equals(b) returns true.
Use == for primitive types (int, char, etc.) and .equals() for objects.
Improper use of...
Java's garbage collector automatically manages memory by reclaiming unused objects, improving performance and preventing memory leaks.
Garbage Collection (GC) is the process of automatically identifying and disposing of objects that are no longer needed.
Java uses several GC algorithms, including Serial, Parallel, CMS (Concurrent Mark-Sweep), and G1 (Garbage-First).
The Serial GC is a simple, single-threaded collector sui...
Java 8 introduced lambdas, Stream API, and other features that enhance functional programming and improve code readability.
Lambdas: Enable concise representation of functional interfaces. Example: (x, y) -> x + y.
Stream API: Allows processing sequences of elements (collections) in a functional style. Example: list.stream().filter(x -> x > 10).collect(Collectors.toList()).
Default Methods: Interfaces can have me...
Checked exceptions must be declared or handled; unchecked exceptions do not require explicit handling.
Checked exceptions are subclasses of Exception but not of RuntimeException.
Example of checked exception: IOException, which must be caught or declared.
Unchecked exceptions are subclasses of RuntimeException.
Example of unchecked exception: NullPointerException, which does not need to be declared.
Checked exceptions are t...
The Java Memory Model defines how threads interact through memory, ensuring visibility and ordering of shared variables.
The Java Memory Model (JMM) specifies how threads interact with memory, ensuring consistency and visibility of shared variables.
It defines rules for visibility, atomicity, and ordering of operations in a multithreaded environment.
Without proper synchronization, threads may see stale or inconsistent da...
Method overloading allows multiple methods with the same name but different parameters; overriding allows subclass methods to replace superclass methods.
Method Overloading: Same method name, different parameter types or counts.
Example of Overloading: 'int add(int a, int b)' and 'double add(double a, double b)'.
Use Overloading for convenience and readability when performing similar operations.
Method Overriding: Same met...
Functional interfaces in Java are interfaces with a single abstract method, enabling lambda expressions for concise code.
A functional interface has exactly one abstract method.
They can have multiple default or static methods.
Common examples include Runnable, Callable, and Comparator.
Lambda expressions provide a clear and concise way to implement functional interfaces.
Example of a custom functional interface: @Functiona...
Java Streams provide a functional approach to processing sequences of elements, unlike Iterators which are imperative.
Streams are part of the Java 8+ API, enabling functional-style operations on collections.
Unlike Iterators, Streams do not store data; they process data on-the-fly.
Streams support operations like map, filter, and reduce, allowing for concise and readable code.
Example: List<String> names = Arrays.as...
Immutability in Java means objects cannot be modified after creation, enhancing security and performance.
1. Immutability: Once created, an object's state cannot be changed.
2. String Class: Strings in Java are immutable; any modification creates a new String object.
3. Example: String s1 = "Hello"; s1 = s1 + " World!"; // s1 now points to a new String object.
4. Advantages: Thread-safe, easier to cache, and can be used as...
final, finally, and finalize serve different purposes in Java: variable declaration, exception handling, and garbage collection respectively.
final: Used to declare constants. Example: final int MAX_VALUE = 100;
finally: Block that executes after try-catch, regardless of exceptions. Example: try { ... } catch { ... } finally { ... }
finalize: Method called by the garbage collector before an object is removed. Example: pro
The Singleton pattern restricts instantiation of a class to one object, ensuring controlled access to that instance.
1. The Singleton pattern ensures a class has only one instance and provides a global point of access to it.
2. Common implementations include lazy initialization, eager initialization, and double-checked locking.
3. Lazy initialization: Create the instance when it is needed, using synchronized method for th...
Java annotations provide metadata for classes, methods, and fields, enhancing functionality in frameworks like Spring.
Annotations are metadata that provide information about the program but are not part of the program itself.
In Spring, annotations like @Component, @Service, and @Controller are used for defining beans and their roles.
Built-in annotations include @Override, @Deprecated, and @SuppressWarnings, which serve...
Java Streams enable parallel processing for efficient data handling but come with potential pitfalls that need careful management.
Java Streams can be processed in parallel using the 'parallelStream()' method, which divides the workload across multiple threads.
Parallel streams utilize the Fork/Join framework, allowing tasks to be split and executed concurrently, improving performance for large datasets.
Potential pitfall...
== checks reference equality; .equals() checks value equality, can be overridden for custom comparison.
== compares memory addresses: new String("hello") == new String("hello") returns false.
.equals() compares actual content: "hello".equals("hello") returns true.
Override equals() when logical equality differs from reference equality, e.g., in custom classes.
When overriding equals(), also override hashCode() to maintain ...
Lambda expressions enhance Java code readability and maintainability by simplifying syntax and promoting functional programming.
Concise Syntax: Lambda expressions reduce boilerplate code. For example, instead of writing an anonymous class for a Runnable, you can use: `Runnable r = () -> System.out.println("Hello");`
Improved Readability: Code becomes more expressive. For instance, using `list.forEach(item -> Syste...
I am writing automation and clicking on aptitude test.
I am writing automation and clicking on assignment test.
This is an automation test. I got this task from my senior. I'm doing good.
ArrayList and LinkedList are both classes in Java that implement the List interface, but they have different underlying data structures.
ArrayList uses a dynamic array to store elements, providing fast random access but slower insertion and deletion.
LinkedList uses a doubly linked list to store elements, providing fast insertion and deletion but slower random access.
Choose ArrayList when you need fast random access and ...
Using Java's synchronized keyword for thread synchronization has advantages like simplicity and disadvantages like potential deadlock. ReentrantLock offers more flexibility and control.
Advantages of synchronized keyword: simplicity, built-in support in Java
Disadvantages of synchronized keyword: potential for deadlock, lack of flexibility
ReentrantLock offers more control over locking, ability to try and lock with timeou...
In Java, == compares memory addresses while .equals() compares values. Improper usage can lead to unexpected results.
Use == to compare primitive data types or to check if two objects reference the same memory address.
Use .equals() to compare the actual values of objects, such as strings or custom classes.
Improper usage of == with objects can lead to unexpected results as it compares memory addresses, not values.
The Java garbage collector is responsible for automatically managing memory by reclaiming unused objects.
The garbage collector in Java runs in the background and identifies objects that are no longer needed.
There are different types of garbage collection algorithms in Java such as Serial, Parallel, CMS, G1, and ZGC.
Each algorithm has its own way of managing memory and reclaiming unused objects efficiently.
For example, ...
Java 8 introduced features like lambdas and Stream API which have revolutionized the way Java applications are written.
Lambdas allow for more concise and readable code by enabling functional programming paradigms.
Stream API provides a way to process collections of objects in a functional style, making code more expressive and efficient.
Java 8 also introduced default methods in interfaces, allowing for backward compatib...
Checked exceptions are checked at compile time, while unchecked exceptions are not. Proper handling involves either catching or declaring the exception.
Checked exceptions must be either caught or declared in the method signature using the 'throws' keyword.
Unchecked exceptions do not need to be explicitly caught or declared.
Examples of checked exceptions include IOException and ClassNotFoundException, while examples of ...
The Java Memory Model defines how threads interact through memory and how changes made by one thread are visible to others.
Java Memory Model specifies how threads interact with memory
It ensures visibility of changes made by one thread to other threads
Volatile keyword in Java helps ensure visibility by preventing threads from caching variables locally
Volatile variables are always read from and written to main memory, no
Method overloading involves creating multiple methods in the same class with the same name but different parameters. Method overriding involves creating a new implementation of a method in a subclass.
Method overloading is used to provide multiple methods with the same name but different parameters in the same class. Example: void print(int num) and void print(String str)
Method overriding is used to provide a new implem...
Functional interfaces in Java are interfaces with a single abstract method. They can be used with lambda expressions for functional programming.
Functional interfaces have only one abstract method, but can have multiple default or static methods.
Lambda expressions can be used to implement the abstract method of a functional interface concisely.
An example of a custom functional interface is 'Calculator' with a single abs
Java Stream is a sequence of elements that supports functional-style operations. It differs from Iterator by allowing for more concise and declarative code.
Streams are used to process collections in a functional programming style, allowing for operations like filter, map, reduce, etc.
Streams do not store elements, they operate on the source data structure (e.g., List) directly.
Iterators are used to sequentially access ...
Immutability in Java refers to objects whose state cannot be changed after creation. String class achieves immutability by not allowing modifications to its value.
Immutability means that once an object is created, its state cannot be changed.
String class achieves immutability by making its value final and not providing any methods to modify it.
Advantages of immutable objects include thread safety, caching, and easier d
final, finally, and finalize have different meanings in Java.
final is a keyword used to declare constants, immutable variables, or prevent method overriding.
finally is a block used in exception handling to execute code after try-catch block, regardless of an exception.
finalize is a method used for cleanup operations before an object is garbage collected.
Singleton design pattern ensures a class has only one instance and provides a global point of access to it.
Create a private static instance of the class.
Make the constructor private to prevent instantiation from outside the class.
Provide a public static method to access the instance, creating it if necessary.
Use synchronized keyword or double-checked locking to ensure thread safety.
Java annotations are metadata that provide data about a program but do not affect the program itself. They are used in frameworks like Spring to simplify configuration and reduce boilerplate code.
Java annotations are used to provide metadata about classes, methods, fields, etc. They are defined using the @ symbol.
In Spring framework, annotations are used to configure various aspects of the application, such as dependen...
Java Streams can handle parallel processing using parallel streams. Pitfalls include increased complexity and potential for race conditions.
Java Streams can be processed in parallel using the parallel() method.
Potential pitfalls of using parallel streams include increased complexity, potential for race conditions, and performance overhead.
To mitigate these pitfalls, ensure that the operations performed on the stream ar...
Java Streams can handle parallel processing using parallel streams. Pitfalls include increased complexity and potential for race conditions.
Java Streams can utilize parallel processing by using parallel streams, which automatically distribute the workload across multiple threads.
Potential pitfalls of using parallel streams include increased complexity, potential for race conditions, and overhead of managing parallelism...
I am writing automation and clicking on aptitude test.
I am writing automation and clicking on assignment test.
This is an automation test. I got this task from my senior. I'm doing good.
Some of the top questions asked at the 10405090xyzabc interview -
The duration of 10405090xyzabc interview process can vary, but typically it takes about 2-4 weeks to complete.
based on 1.4k interviews
Interview experience
based on 17 reviews
Rating in categories
Software Developer
11.3k
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
8.2k
salaries
| ₹0 L/yr - ₹0 L/yr |
Sales Officer
332
salaries
| ₹0 L/yr - ₹0 L/yr |
Softwaretest Engineer
25
salaries
| ₹0 L/yr - ₹0 L/yr |
Test Engineer
12
salaries
| ₹0 L/yr - ₹0 L/yr |
Oyo Rooms
FabHotels
Taco Bell
TAJSATS AIR CATERING