i
10405090xyzabc
Filter interviews by
I applied via Campus Placement and was interviewed in Sep 2023. There were 3 interview rounds.
This is a question that is meant for testing
This is a question that is meant for testing.
I appeared for an interview in Feb 2025, where I was asked the following questions.
ArrayList offers fast access and is memory efficient, while LinkedList excels in insertions and deletions.
ArrayList uses a dynamic array, allowing O(1) access time for elements. Example: accessing the 5th element is quick.
LinkedList uses a doubly linked structure, enabling O(1) insertions/deletions at both ends. Example: adding/removing elements at the head.
ArrayList is preferred for scenarios with frequent retrievals,...
== checks reference equality; .equals() checks value equality. Override equals() for custom comparison logic.
== compares memory addresses, while .equals() compares actual object 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 eq...
Lambda expressions enhance Java code by improving readability and maintainability through concise syntax and functional programming.
Concise Syntax: Lambda expressions reduce boilerplate code, making it easier to read. Example: (x, y) -> x + y instead of creating a full class.
Functional Programming: Encourages a functional style, allowing developers to focus on 'what' to do rather than 'how' to do it.
Improved Readabi...
Checked exceptions require handling, while unchecked exceptions indicate programming errors. Custom exceptions can be either type.
Checked exceptions must be caught or declared, e.g., IOException, SQLException.
Unchecked exceptions do not require explicit handling, e.g., NullPointerException, ArithmeticException.
Checked exceptions promote robust error handling but can clutter code.
Unchecked exceptions signal programming ...
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 critical sections simulta...
Method overloading allows same method name with different parameters; overriding changes parent method behavior in subclasses.
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).
Overloadi...
Functional interfaces in Java enable concise lambda expressions and support API evolution through default methods.
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 include multiple default or static methods.
The @FunctionalInterface annotation ensures only one abstract method is present.
...
Java Streams enable functional operations on collections, differing from Iterators in performance and usage.
Streams support functional-style operations like filter(), map(), and reduce().
Example: list.stream().filter(x -> x > 10).collect(Collectors.toList());
Streams are not reusable; once consumed, they cannot be used again.
Iterators can be reset and reused, allowing for multiple traversals.
Parallel streams can i...
Immutability in Java ensures objects cannot be modified after creation, enhancing thread safety and consistency.
Immutable objects cannot be changed once created, e.g., String class.
Thread-safe by nature, as they prevent concurrent modifications.
Help avoid unintended side effects in multi-threaded applications.
To create an immutable class, use final fields and no setters.
Collections can be made immutable using Collectio...
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;
finally: A block that executes after try-catch. Example: try { ... } catch (Exception e) { ... } finally { cleanup(); }
finalize(): A method called by the garbage collector. Example: protected void finalize() { ... }
final variable: Can...
The Singleton pattern restricts a class to a single instance, useful for shared resources like database connections.
Private constructor prevents instantiation from outside the class.
Static instance variable holds the single instance of the class.
Lazy initialization creates the instance only when needed.
Eager initialization creates the instance at class loading time.
Thread safety can be achieved using synchronized metho...
Java annotations provide metadata for classes, enhancing code readability and reducing boilerplate in frameworks like Spring.
Annotations like @Component and @Service simplify Spring's dependency injection.
Built-in annotations such as @Override help clarify method intentions.
Custom annotations can be created using @interface for specific needs.
Retention policies (e.g., @Retention(RetentionPolicy.RUNTIME)) determine anno...
Java Streams enable parallel processing via ForkJoin framework, enhancing performance but with potential pitfalls.
Use parallel streams for CPU-intensive tasks to leverage multiple cores.
Avoid using parallel streams for small datasets as overhead may outweigh benefits.
Be cautious of shared mutable state to prevent race conditions.
Use forEachOrdered() for order-sensitive operations, but be aware of performance trade-offs...
I appeared for an interview in Feb 2025, where I was asked the following questions.
== 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 creating an anonymous class for a Runnable, you can use: `Runnable r = () -> System.out.println("Hello");`
Readability: They allow developers to express actions more clearly. For instance, using `list.forEach(it...
Checked exceptions require handling; unchecked exceptions do not. Custom exceptions can be either based on use case.
Checked exceptions must be caught or declared (e.g., IOException, SQLException).
Unchecked exceptions do not require explicit handling (e.g., NullPointerException, ArithmeticException).
Checked exceptions promote robust error handling but can clutter code.
Unchecked exceptions indicate programming errors tha...
Method overloading allows same method name with different parameters; overriding changes parent method behavior in subclasses.
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 parent method (e.g., `void sound()` in `Animal` class overridden in `Dog` class)
Overloading is resolved...
Functional interfaces in Java enable concise lambda expressions and support API evolution through default methods.
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 include multiple default or static methods.
The @FunctionalInterface annotation ensures only one abstract method is present.
...
Immutability in Java ensures objects cannot be changed after creation, enhancing thread safety and preventing unintended side effects.
Immutable objects cannot be modified after creation, e.g., String class.
Thread-safe by nature, as they prevent concurrent modification issues.
Useful in multi-threaded applications to avoid unintended side effects.
To create an immutable class, use final fields and avoid setters.
Collection...
Singleton pattern restricts class instantiation to one object, useful for shared resources like database connections.
Private constructor prevents instantiation from outside the class.
Static instance variable holds the single instance of the class.
Lazy initialization creates the instance only when needed.
Eager initialization creates the instance at class loading time.
Thread safety can be achieved using synchronized meth...
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 improve code clarity by indicating overridden methods.
Custom annotations can encapsulate repetitive configurations, reducing boilerplate code.
Retentio...
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.
Avoid shared mutable state to prevent race conditions; use immutable data structures.
Consider using 'collect()' with a concurrent collector for thread-safe operations.
Use 'forEachOrdered()' for order-se...
I appeared for an interview in Feb 2025, where I was asked the following questions.
10405090xyzabc interview questions for popular designations
I appeared for an interview in Feb 2025, where I was asked the following questions.
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 negate performance benefits.
Be cautious with shared mutable state to prevent race conditions; prefer immutable data structures.
Use forEachOrdere...
I appeared for an interview in Feb 2025, where I was asked the following questions.
Java annotations provide metadata for classes and methods, enhancing code readability and reducing boilerplate in frameworks like Spring.
Annotations like @Component and @Service simplify bean configuration in Spring.
Dependency injection is streamlined with @Autowired, reducing manual wiring.
Custom annotations can encapsulate common behaviors, improving code clarity.
Annotations reduce the need for XML configuration, mak...
I appeared for an interview in Feb 2025, where I was asked the following questions.
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 appeared for an interview in Feb 2025, where I was asked the following questions.
ArrayList offers fast access and is memory efficient, while LinkedList excels in insertions and deletions.
ArrayList uses a dynamic array, allowing O(1) access time for elements.
LinkedList uses a doubly linked structure, enabling O(1) insertions/deletions at both ends.
Example: Use ArrayList for a list of user IDs where frequent access is needed.
Example: Use LinkedList for a playlist where songs are frequently added or r...
== 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 appeared for an interview in Feb 2025, where I was asked the following questions.
ArrayList uses a dynamic array for storage, while LinkedList uses a doubly linked list structure.
ArrayList provides fast random access (O(1)) but slow insertions/deletions (O(n)). Example: accessing elements by index.
LinkedList allows fast insertions/deletions (O(1)) but slower random access (O(n)). Example: adding/removing elements at the beginning.
ArrayList is preferred when you need frequent access to elements and f...
Java's synchronized keyword offers thread safety but has limitations compared to ReentrantLock.
Advantages of synchronized: Simple to use and understand.
Disadvantages of synchronized: Can lead to thread contention and performance issues.
ReentrantLock allows more flexibility, such as tryLock() and timed lock attempts.
ReentrantLock supports fairness policies, which can help avoid starvation.
Synchronized blocks are tied to...
In Java, '==' checks reference equality, while '.equals()' checks value equality. Use them appropriately to avoid bugs.
== compares object references, checking if two references point to the same object in memory.
Example: String a = new String('test'); String b = new String('test'); a == b returns false.
.equals() compares the actual content of the objects, checking if they are logically equivalent.
Example: a.equals(b) r...
Java's garbage collector automatically manages memory by reclaiming unused objects, improving performance and preventing memory leaks.
Java uses automatic garbage collection to manage memory, freeing developers from manual memory management.
The main garbage collection algorithms in Java include: Serial GC, Parallel GC, Concurrent Mark-Sweep (CMS), and G1 GC.
Serial GC is a simple, single-threaded collector suitable for s...
Java 8 introduced lambdas, Stream API, and other features that enhance functional programming and simplify code.
Lambdas: Enable concise representation of functional interfaces. Example: (x, y) -> x + y.
Stream API: Facilitates functional-style operations on collections. Example: list.stream().filter(x -> x > 10).collect(Collectors.toList()).
Default Methods: Allow adding new methods to interfaces without breakin...
Checked exceptions must be handled or declared, while unchecked exceptions do not require explicit handling.
Checked exceptions are subclasses of Exception (excluding RuntimeException). Example: IOException.
Unchecked exceptions are subclasses of RuntimeException. Example: NullPointerException.
Checked exceptions must be either caught using try-catch or declared in the method signature with throws.
Unchecked exceptions can...
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 through memory and what behaviors are allowed.
It defines rules for visibility, atomicity, and ordering of operations in a multithreaded environment.
Without proper synchronization, threads may see stale data due to caching or compiler optimizat...
Method overloading allows multiple methods with the same name but different parameters; overriding replaces a superclass method in a subclass.
Method Overloading: Same method name, different parameters (type, number, or both).
Example of Overloading: 'int add(int a, int b)' and 'double add(double a, double b)'.
Use Overloading for convenience and readability when methods perform similar functions.
Method Overriding: Redefi...
I appeared for an interview in Feb 2025, where I was asked the following questions.
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 ...
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, each with unique characteristics.
Memory is divided into Young Generation (short-lived objects) and Old Generation (long-lived objects).
Minor GC ...
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...
Top trending discussions
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 18 reviews
Rating in categories
Software Developer
11.4k
salaries
| ₹1 L/yr - ₹8.5 L/yr |
Software Engineer
8.2k
salaries
| ₹1 L/yr - ₹5.4 L/yr |
Sales Officer
183
salaries
| ₹5.3 L/yr - ₹5.3 L/yr |
Softwaretest Engineer
25
salaries
| ₹1 L/yr - ₹1.9 L/yr |
Test Engineer
12
salaries
| ₹1.8 L/yr - ₹7.3 L/yr |
Oyo Rooms
FabHotels
Taco Bell
TAJSATS AIR CATERING