HDFC Bank Interview Preparation
55+ SQL, Java, Spring Boot, Banking domain questions with complete code solutions for fintech freshers.
| Question | Answer | Category |
|---|---|---|
| Q1. Write query to find duplicate records in table. | Use GROUP BY with HAVING clause to filter groups with count > 1. | Coding |
| Q2. Difference between PRIMARY KEY and UNIQUE constraint. | PRIMARY: not null, only one per table. UNIQUE: allows null, multiple allowed. Primary keys are indexed automatically. | Technical |
| Q3. Write query for nth highest salary. | Use OFFSET with ORDER BY DESC, or LIMIT with variable. | Coding |
| Q4. What are INNER, LEFT, RIGHT, FULL OUTER JOINs? | INNER: common rows. LEFT: all from left + matching right. RIGHT: all from right + matching left. FULL: all rows. | Technical |
| Q5. Query to find employees without matching department. | Use LEFT JOIN with WHERE condition checking NULL in right table. | Coding |
| Q6. What is KYC and AML? | KYC (Know Your Customer): identity verification. AML (Anti-Money Laundering): detect suspicious transactions. | Technical |
| Q7. Explain CASA account. | CASA: Current Account Savings Account. Combines benefits of current and savings accounts for businesses. | Technical |
| Q8. What is Spring Boot? | Framework for building production-ready applications with minimal configuration. Auto-configuration, embedded servers. | Technical |
| Q9. Explain MVC pattern. | Model: data. View: presentation. Controller: logic. Separates concerns for maintainability. | Technical |
| Q10. What is dependency injection? | Pattern where objects' dependencies injected at runtime, not created inside. Improves testability and flexibility. | Technical |
| Q11. Two Sum problem. | Use hashmap to store complements. O(n) time complexity. | Coding |
| Q12. Reverse a string. | Simple string slicing or iterate backwards. | Coding |
| Q13. Check if string is palindrome. | Compare string with its reverse or use two pointers. | Coding |
| Q14. What are final, finally, finalize? | final: prevent modification. finally: cleanup block. finalize: garbage collection method. | Technical |
| Q15. Difference between DELETE and TRUNCATE. | DELETE: slower, triggers fire, can rollback. TRUNCATE: faster, no triggers, identity reset. | Technical |
| Q16. Find maximum element in array. | Iterate through array, track maximum value. | Coding |
| Q17. Write query using subquery. | Nested SELECT statement inside main query. | Coding |
| Q18. Count occurrences of character. | Use dictionary/counter or count method. | Coding |
| Q19. What is static keyword? | Static variables/methods belong to class, not instance. Shared across all objects. | Technical |
| Q20. Remove duplicates from array. | Use set() for unique elements or two-pointer for sorted array. | Coding |
| Q21. What is EMI? | Equated Monthly Installment: fixed payment amount for loan repayment over specified period. | Technical |
| Q22. Indexing in databases. | Creates data structure for faster retrieval. Trade-off: faster reads, slower writes, more storage. | Technical |
| Q23. Merge two sorted arrays. | Use two pointers to compare and merge. | Coding |
| Q24. Interface vs Abstract class. | Interface: all abstract (Java 8+: default methods). Abstract: mix abstract and concrete. | Technical |
| Q25. VIEWS in SQL. | Virtual table created from query. No separate storage. Used for security and simplifying complex queries. | Technical |
| Q26. Anagram check. | Sort both strings and compare, or use character frequency. | Coding |
| Q27. What is Core Banking System? | Central repository for customer data, transactions, accounts. Examples: Finacle, Flexcube. | Technical |
| Q28. What is OOP? | Object-Oriented Programming: objects, classes, inheritance, polymorphism, encapsulation, abstraction. | Technical |
| Q29. Fibonacci series. | Each number = sum of previous two. F(0)=0, F(1)=1. | Coding |
| Q30. Stored procedures. | Pre-compiled SQL code stored in database. Improves performance, security, reusability. | Technical |
| Q31. Prime number check. | Check if divisible by any number 2 to sqrt(n). | Coding |
| Q32. Strings are immutable in Java? | Yes, String objects cannot be modified. String + creates new object. Use StringBuilder for mutable strings. | Technical |
| Q33. Factorial calculation. | Product of all positive integers ≤ n. Iterative or recursive approach. | Coding |
| Q34. UNION vs UNION ALL. | UNION: distinct rows, removes duplicates. UNION ALL: all rows including duplicates. | Technical |
| Q35. What is digital banking? | Banking through online/mobile platforms. Includes fund transfers, bill payments, loans, investments. | Technical |
| Q36. Sort array using bubble sort. | Compare adjacent elements, swap if wrong order. Repeat until sorted. | Coding |
| Q37. HashMap vs Hashtable. | HashMap: non-synchronized, faster. Hashtable: synchronized, thread-safe, legacy. | Technical |
| Q38. Binary search implementation. | Divide search interval in half repeatedly on sorted array. | Coding |
| Q39. TRIGGER in database. | Automatic action executed before/after INSERT, UPDATE, DELETE events on table. | Technical |
| Q40. Tell me about yourself. | Education, projects, internships, relevant skills, why banking interested you. | HR |
| Q41. Why HDFC Bank? | Strong reputation, fintech innovation, career growth, customer-centric approach. | HR |
| Q42. Your strengths. | Analytical thinking, attention to detail, teamwork, problem-solving, quick learner. | HR |
| Q43. Weaknesses. | Perfectionist (learning to prioritize), sometimes hesitant (building confidence). | HR |
| Q44. Handling pressure and deadlines. | Prioritize tasks, break into smaller chunks, communicate, remain calm and focused. | HR |
| Q45. Team experience example. | Use STAR method. Project, roles, communication, collaboration, results achieved. | HR |
| Q46. Have you worked with databases? | Mention SQL projects, CRUD operations, optimization, data integrity experience. | HR |
| Q47. Salary expectations. | Research banking sector salary. Give range with flexibility based on location. | HR |
| Q48. Any questions for us? | Ask about team, tech stack, banking domain exposure, career growth, training. | HR |
| Q49. Linear search implementation. | Traverse array sequentially, return index when found. | Coding |
| Q50. What is NPA? | Non-Performing Asset: loan where interest/principal not paid for 90+ days. | Technical |
| Q51. Normalization forms. | 1NF: atomic values. 2NF: no partial dependency. 3NF: no transitive dependency. BCNF: every determinant is candidate key. | Technical |
| Q52. GCD/LCM calculation. | GCD: Euclidean algorithm. LCM = (a*b)/GCD(a,b). | Coding |
| Q53. String reversal without built-in. | Use loop to build reversed string or use recursion. | Coding |
| Q54. Encapsulation principle. | Bundling data and methods. Hide internal details. Use getters/setters for access control. | Technical |
| Q55. Why should we hire you? | Strong technical foundation, banking interest, team player, quick learner, committed to growth. | HR |