Oracle Interview Experience for Java Developer | Offer ACCEPTED
Summary
I successfully navigated a rigorous 5-round interview process at Oracle for a Java Developer position, demonstrating proficiency in data structures, algorithms, core Java concepts, and system design, ultimately leading to an offer for an Applications Engineer role.
Full Experience
My interview journey with Oracle for a Java Developer position spanned 10 days, with each round serving as an elimination stage. A recruiter initially contacted me via Naukri.
Round 1: Online Assessment
This round featured two questions. I had to solve a coding problem and also demonstrate my ability to make a REST API call using Java, parsing the JSON response.
Round 2: F2F Interview (1 hour)
After two days, I received a call for the onsite interviews. For all these rounds, I had to write code on paper and explain my approach. This round covered:
- Coding: Printing all subsets with a given sum.
- Java Concepts: Exceptional Hierarchy, questions on strings (code snippets,
string intern()method), and the differences betweenFinal,Finally, andFinalize. - One conceptual question: Can a
tryblock be used without acatchblock?
Round 3: F2F Interview (1 hour, same day)
This round was also focused on coding and some technical concepts:
- Coding: Adding two numbers represented by linked lists.
- Database: Finding the nth highest employee salary from a table, and finding the name of an employee with the Nth highest salary from a list.
- Front-end: What is AJAX?
- Coding: Identifying all leaders in an array of integers (an element is a leader if it's greater than all its right elements).
Round 4: F2F Interview (1.5 hours, same day)
This round delved deeper into design principles and advanced coding problems:
- Object-Oriented Programming: I explained all OOPs concepts with practical examples from my projects.
- Software Design: I explained SOLID principles with practical examples from my projects.
- Java Concepts: Exceptional hierarchy in detail (Error vs Exception, Checked vs Unchecked).
- Coding: Sorting two arrays (names and cities) based on names, then by city if names are equal.
- Coding: Printing array elements in an alternating high-low order (first highest, first smallest, second highest, second smallest, and so on).
- System Design: I explained steps involved from request to response.
- Database: How to optimize database performance.
Round 5: F2F Interview (2 hours)
After a two-day wait, I had my final and most extensive interview:
- Design Patterns: I explained and wrote code for design patterns I had worked with.
- Java Concepts: Exceptional hierarchy (again), questions on code snippets, constructors, serialization/deserialization in depth,
StringvsStringBuffervsStringBuilder, functional interfaces, marker interfaces. - Coding: Finding combinations of digits for a 3-digit integer that sum to a given value.
- Project Discussion: Several questions about my projects.
- Memory Management: Discussed memory management.
- Java Concepts: Abstract classes and interfaces in depth, including whether an abstract class must have at least one abstract method.
The verdict came after three days: I was selected! Oracle offered me the role of Applications Engineer with a fixed salary of 19 LPA, without bonuses or stocks. My previous experience was with TCS as a Java Spring Boot Developer with 2 years and 1 month of experience.
Interview Questions (31)
Given a string s, find the length of the longest substring without repeating characters.
Given a URI, write Java code to make a REST API call, fetch the JSON response, and process its contents.
Given a set of numbers and a target sum, print all subsets of the set whose elements sum up to the target.
Explain the Java Exception Hierarchy, including Throwable, Error, Exception, RuntimeException, and their relationships.
Explain the purpose and behavior of the String.intern() method in Java.
Differentiate between the final keyword, the finally block, and the finalize() method in Java, providing use cases for each.
Can a try block be used without a catch block in Java? If yes, how and why?
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.
Write a SQL query to find the Nth highest employee salary from an Employees table.
Given a list of employee objects, each with a name and salary, find the name of the employee who has the Nth highest salary.
Explain what AJAX (Asynchronous JavaScript and XML) is, its purpose, and how it works in front-end web development.
Given an array of integers, find all 'leaders' in the array. A leader is an element that is greater than all the elements to its right. The leaders should be returned in the order they appear.
Explain core Object-Oriented Programming (OOPs) concepts such as Encapsulation, Inheritance, Polymorphism, and Abstraction, providing practical examples of how they were applied in your projects.
Explain each of the SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) and demonstrate their application with practical examples from your projects.
Elaborate on the Java exception hierarchy, providing a detailed comparison between Error and Exception, and explaining the distinction between checked and unchecked exceptions.
Given two arrays, one for employee names (names[]) and one for their corresponding cities (cities[]), sort the data primarily by name. If names are identical, then sort by city.
Given an array of integers, print its elements in the following order: the highest element, then the smallest, then the second highest, then the second smallest, and so on.
Explain the end-to-end steps involved in a typical web request-response cycle, from a client making a request to receiving a response from a server.
Discuss various techniques and strategies to optimize database performance.
Explain specific design patterns you have experience with (e.g., Singleton, Factory, Observer) and demonstrate their implementation with code examples relevant to your projects.
Explain the Java Exception Hierarchy, including Throwable, Error, Exception, RuntimeException, and their relationships.
Discuss Java constructors in depth, including constructor overloading, default constructors, and constructor chaining.
Explain the concepts of serialization and deserialization in Java, including how to implement them, common issues, and use cases.
Compare and contrast String, StringBuffer, and StringBuilder in Java, focusing on their immutability, thread-safety, and performance characteristics.
Explain what functional interfaces are in Java, their purpose, and how they are used with lambda expressions.
Explain what marker interfaces are in Java and provide examples of their use.
Explain the concept of String pooling in Java and how String concatenation works, including performance considerations.
Given a target sum, find all combinations of single-digit numbers (0-9) that add up to the target sum.
Discuss Java memory management, including JVM memory areas (Heap, Stack, Method Area), garbage collection, and best practices.
Explain Java abstract classes and interfaces in depth, comparing their features, use cases, and how they achieve abstraction and polymorphism.
Is it mandatory for an abstract class in Java to have at least one abstract method? Explain.
Preparation Tips
I diligently prepared by focusing on core Java concepts, object-oriented programming principles, and a wide range of data structures and algorithms. For system design, I reviewed common architectural patterns and best practices. My practical experience from various projects was crucial, as many interview questions involved explaining concepts with real-world examples and writing code on paper. I also revisited database optimization techniques and front-end fundamentals like AJAX.