Software Engineer 2 Interview Questions

2,531 software engineer 2 interview questions shared by candidates

What are the main differences between == and .equals() in Java? (Covers object comparison and string handling.) Explain how Java achieves platform independence. (JVM, bytecode, JIT compilation.) What is the difference between ArrayList and LinkedList? (Performance trade-offs, memory usage, internal implementation.) What is the difference between final, finally, and finalize()? (Covers keywords, exception handling, garbage collection.) What are checked and unchecked exceptions in Java? (Difference, examples, best practices for handling.) How does Java handle memory management and garbage collection? (Heap, stack, GC algorithms, System.gc().) What is the difference between abstract class and interface? (Default methods in Java 8+, multiple inheritance issues.) Explain how multithreading works in Java. How do you create a thread? (Extending Thread vs implementing Runnable, thread lifecycle.) What is the difference between HashMap, TreeMap, and LinkedHashMap? (Ordering, performance, use cases.) What are Java Streams and how are they different from Collections? (Functional programming, lazy evaluation, parallel streams.)
avatar

SE 2

Interviewed at Infosys

3.6
Sep 10, 2025

What are the main differences between == and .equals() in Java? (Covers object comparison and string handling.) Explain how Java achieves platform independence. (JVM, bytecode, JIT compilation.) What is the difference between ArrayList and LinkedList? (Performance trade-offs, memory usage, internal implementation.) What is the difference between final, finally, and finalize()? (Covers keywords, exception handling, garbage collection.) What are checked and unchecked exceptions in Java? (Difference, examples, best practices for handling.) How does Java handle memory management and garbage collection? (Heap, stack, GC algorithms, System.gc().) What is the difference between abstract class and interface? (Default methods in Java 8+, multiple inheritance issues.) Explain how multithreading works in Java. How do you create a thread? (Extending Thread vs implementing Runnable, thread lifecycle.) What is the difference between HashMap, TreeMap, and LinkedHashMap? (Ordering, performance, use cases.) What are Java Streams and how are they different from Collections? (Functional programming, lazy evaluation, parallel streams.)

2️⃣ Count Subarrays With All Distinct Elements Problem Given an array, count the number of subarrays whose number of distinct elements is equal to the total number of unique elements in the entire array. Key Concepts Sliding Window Frequency map Two pointers Exactly K distinct elements
avatar

SDE-2 Backend

Interviewed at Innovaccer

2.9
Feb 28, 2026

2️⃣ Count Subarrays With All Distinct Elements Problem Given an array, count the number of subarrays whose number of distinct elements is equal to the total number of unique elements in the entire array. Key Concepts Sliding Window Frequency map Two pointers Exactly K distinct elements

1️⃣ Symmetric (Mirror) Binary Tree Problem Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center). Key Concepts DFS / BFS Mirror comparison Tree recursion Queue-based traversal
avatar

SDE-2 Backend

Interviewed at Innovaccer

2.9
Feb 28, 2026

1️⃣ Symmetric (Mirror) Binary Tree Problem Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center). Key Concepts DFS / BFS Mirror comparison Tree recursion Queue-based traversal

Viewing 1231 - 1240 interview questions

Glassdoor has 2,531 interview questions and reports from Software engineer 2 interviews. Prepare for your interview. Get hired. Love your job.