Filter interviews by
Be the first one to contribute and help others!
I appeared for an interview in Feb 2025, where I was asked the following questions.
ArrayList uses dynamic arrays, while LinkedList uses doubly linked nodes for storage and access.
ArrayList provides fast random access (O(1)) due to its underlying array structure.
LinkedList allows for efficient insertions and deletions (O(1)) at both ends and in the middle.
ArrayList has a fixed size, requiring resizing (O(n)) when capacity is exceeded, while LinkedList grows dynamically.
Example: Use ArrayList for frequ...
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 can be used for fair locking, preventing thread 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 both point to the same memory location.
Example: String a = new String('test'); String b = new String('test'); a == b returns false.
.equals() compares the actual content of the objects.
Example: a.equals(b) returns true because the content is the same.
Use '==' f...
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 declared or handled, while unchecked exceptions do not require explicit handling.
Checked exceptions are subclasses of Exception but not of RuntimeException.
Example: IOException, SQLException are checked exceptions.
Unchecked exceptions are subclasses of RuntimeException.
Example: NullPointerException, ArrayIndexOutOfBoundsException are unchecked exceptions.
Checked exceptions must be caught or d...
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.
It defines rules for visibility, atomicity, and ordering of operations in a multithreaded environment.
Synchronization mechanisms (like synchronized blocks) ensure that only one thread can access...
Method overloading allows multiple methods with the same name but different parameters; overriding redefines a method in a subclass.
Method Overloading: Same method name, different parameters (type, number, or both).
Example of Overloading: 'void add(int a, int b)' and 'void add(double a, double b)'.
Use Overloading for convenience and readability when methods perform similar functions.
Method Overriding: Redefining a meth...
I appeared for an interview in Feb 2025, where I was asked the following questions.
ArrayList uses dynamic arrays, while LinkedList uses doubly linked nodes for storage. Choose based on performance needs.
ArrayList is backed by a dynamic array, allowing fast random access. Example: accessing an element by index is O(1).
LinkedList consists of nodes that hold data and references to the next and previous nodes, making insertions/deletions O(1) if the node is known.
ArrayList has a fixed size, and resizing ...
== checks reference equality, while .equals() checks value equality in Java objects.
== compares memory addresses (references) of objects.
Example: String a = new String("test"); String b = new String("test"); a == b returns false.
.equals() compares the actual content of objects.
Example: a.equals(b) returns true.
Use == for primitive types (int, char, etc.) and .equals() for object comparisons.
Improper use of == can lead
Java's garbage collector automatically manages memory by reclaiming unused objects, enhancing 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 and the Stream API, enhancing functional programming and data processing capabilities.
Lambdas: Enable concise representation of functional interfaces, e.g., (x, y) -> x + y.
Stream API: Facilitates functional-style operations on collections, e.g., list.stream().filter(x -> x > 10).collect(Collectors.toList()).
Default Methods: Allow adding new methods to interfaces without breaking exis...
Checked exceptions must be declared or handled, while unchecked exceptions do not require explicit handling in Java.
Checked exceptions are subclasses of Exception but not of RuntimeException.
Unchecked exceptions are subclasses of RuntimeException.
Example of checked exception: IOException, which must be caught or declared.
Example of unchecked exception: NullPointerException, which does not require explicit handling.
Chec...
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 ensures visibility of shared variables across threads, preventing stale data issues.
Synchronization mechanisms (like synchronized blocks) enforce mutual exclusion and visibility.
The 'volatile' k...
Method overloading allows multiple methods with the same name but different parameters; overriding redefines a method in a subclass.
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 methods perform similar functions.
Method Overriding: Redefining a method in a ...
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)) due to its underlying array structure.
LinkedList allows for efficient insertions and deletions (O(1)) at both ends and in the middle.
ArrayList has a fixed size, requiring resizing (O(n)) when capacity is exceeded, while LinkedList grows dynamically.
Example: Use ArrayList for freq...
Java's synchronized keyword offers simplicity but has limitations compared to ReentrantLock in flexibility and performance.
Synchronized is easy to use and requires less code, e.g., 'synchronized(this) { ... }'.
It can lead to thread contention and performance bottlenecks in high-concurrency scenarios.
Synchronized blocks are not interruptible, meaning a thread cannot be stopped while waiting for a lock.
ReentrantLock prov...
== checks reference equality, while .equals() checks value equality in Java objects.
== compares memory addresses (references) of objects.
Example: String a = new String("test"); String b = new String("test"); a == b returns false.
.equals() compares the actual content of objects.
Example: a.equals(b) returns true for the same content.
Use == for primitive types (int, char, etc.) and .equals() for object comparisons.
Imprope...
Java's garbage collector automatically manages memory by reclaiming unused objects, enhancing performance and preventing memory leaks.
Java uses automatic memory management through garbage collection.
The main types of garbage collection algorithms are: Serial, Parallel, Concurrent Mark-Sweep (CMS), and G1 (Garbage-First).
Serial GC is suitable for small applications with a single thread, using a simple stop-the-world app...
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: Facilitates functional-style operations on collections. Example: list.stream().filter(x -> x > 10).collect(Collectors.toList()).
Default Methods: Allow adding new methods to interfaces with...
Checked exceptions must be handled or declared, while unchecked exceptions do not require explicit handling.
Checked exceptions are subclasses of Exception, excluding RuntimeException and its subclasses.
Unchecked exceptions are subclasses of RuntimeException and Error.
Example of checked exception: IOException, which must be caught or declared in the method signature.
Example of unchecked exception: NullPointerException, ...
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 ensures visibility of shared variables between threads, preventing stale data issues.
Synchronization mechanisms (like synchronized blocks) enforce mutual exclusion and visibility.
The 'volatile' ...
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 uses dynamic arrays, while LinkedList uses doubly linked nodes for storage and access.
ArrayList provides fast random access (O(1)) due to its underlying array structure.
LinkedList allows for efficient insertions and deletions (O(1)) at both ends, as it only requires pointer updates.
ArrayList has a fixed size, which can lead to resizing overhead when capacity is exceeded.
LinkedList consumes more memory due to ...
== checks reference equality, while .equals() checks value equality in Java objects.
== compares memory addresses (references) of objects.
Example: String a = new String("test"); String b = new String("test"); a == b returns false.
.equals() compares the actual content of objects.
Example: a.equals(b) returns true because the content is the same.
Use == for primitive types (int, char, etc.) and .equals() for object comparis...
Java's garbage collector automatically manages memory by reclaiming unused objects, enhancing 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: 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 methods with ...
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, ensuring consistency and visibility.
It defines rules for visibility, atomicity, and ordering of operations in a multithreaded environment.
Synchronization mechanisms (like synchronized blocks) ensure that only one thread can acc...
Method overloading allows multiple methods with the same name but different parameters; overriding redefines a method in a subclass.
Method Overloading: Same method name, different parameter lists (type, number, or both).
Example of Overloading: 'int add(int a, int b)' and 'double add(double a, double b)'.
Method Overriding: Redefining a method in a subclass that already exists in the superclass.
Example of Overriding: 'vo...
I applied via Campus Placement and was interviewed in Jan 2024. There were 4 interview rounds.
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 applied via Campus Placement and was interviewed in Jan 2024. There were 4 interview rounds.
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 applied via Campus Placement and was interviewed in Jan 2024. There were 4 interview rounds.
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 applied via Campus Placement and was interviewed in Jan 2024. There were 4 interview rounds.
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 applied via Campus Placement and was interviewed in Jan 2024. There were 4 interview rounds.
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 applied via Campus Placement and was interviewed in Mar 2024. There were 5 interview rounds.
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.
This is an automation test. I got this task from my senior. I'm doing good.
based on 11 reviews
Rating in categories
Solution Engineer
6
salaries
| ₹2.4 L/yr - ₹3 L/yr |
ACTE
Birla White
Zeetech Management And Marketing
Ricoh