Oracle
10+ Tele Access E-services Interview Questions and Answers
Q1. Implement Linked list with add, display, insert at end and delete operations.
Implementation of Linked List with add, display, insert at end and delete operations.
Create a Node class with data and next pointer
Create a LinkedList class with head pointer
Add method to add a new node at the end of the list
Display method to print all nodes in the list
Insert at end method to insert a new node at the end of the list
Delete method to delete a node from the list
Q2. Predict Output based on whether static variables can be accessed from non-static method
Static variables can be accessed from non-static methods using an object reference or by making the variable non-static.
Static variables can be accessed from non-static methods by creating an object of the class containing the static variable.
Alternatively, the static variable can be made non-static to be accessed directly from a non-static method.
Attempting to access a static variable directly from a non-static method will result in a compilation error.
Q3. String a = "Something" String b = new String("Something") How many object created?
Two objects created - one in the string pool and one in the heap.
String 'a' is created in the string pool, while String 'b' is created in the heap.
String pool is a special area in the heap memory where strings are stored to increase reusability and save memory.
Using 'new' keyword always creates a new object in the heap, even if the content is the same as an existing string in the pool.
Q4. String a = "Something" a.concat(" New") What will be garbage collected?
Only the original string 'Something' will be garbage collected.
The concat method in Java does not modify the original string, but instead returns a new string with the concatenated value.
In this case, 'a' remains as 'Something' and a new string 'Something New' is created, but not assigned to any variable.
Since the new string is not stored in any variable, it will not be garbage collected.
Q5. Two stack implementation with one single array with no extra space
Implement two stacks using a single array without extra space.
Divide the array into two halves and use one half for each stack.
Keep track of the top of each stack separately.
Handle stack overflow and underflow conditions.
Example: Implementing two stacks for undo and redo operations in a text editor.
Q6. Write code two merge and remove duplicates from two sorted arrays with any Collections
Merge and remove duplicates from two sorted arrays without using Collections
Use two pointers to iterate through both arrays simultaneously
Compare elements at each pointer and add the smaller one to the result array
Skip duplicates by checking if the current element is equal to the previous element
Q7. What do you know about Oracle?
Oracle is a multinational computer technology corporation that specializes in developing and marketing database software and technology.
Oracle is known for its flagship product, the Oracle Database, which is widely used in enterprise applications.
It also offers a range of other software products, including middleware, application development tools, and cloud services.
Oracle has a strong presence in the enterprise market and is a major competitor to other database vendors like...read more
Q8. Write code to emulate Producer/Consumer Problem
Emulate Producer/Consumer Problem using code
Create a shared buffer between producer and consumer
Use synchronization mechanisms like mutex or semaphore to control access to the buffer
Implement producer and consumer functions to add and remove items from the buffer respectively
Q9. What do you like about Oracle?
I appreciate Oracle's robust and reliable software solutions.
Oracle's software is known for its scalability and performance.
Their database management system is widely used and trusted by many organizations.
Oracle's cloud offerings provide a comprehensive suite of services for businesses.
Their commitment to innovation and staying ahead of industry trends is impressive.
Q10. Write code to create a deadlock
Creating a deadlock involves two or more threads waiting for each other to release a resource they need.
Create two threads, each trying to lock two resources in a different order
Ensure that one thread locks resource A first and then tries to lock resource B, while the other thread locks resource B first and then tries to lock resource A
This will result in a situation where each thread is waiting for the other to release the resource it needs, causing a deadlock
Q11. Write code to implement LRU Cache
Implement LRU Cache using a data structure like LinkedHashMap in Java
Use LinkedHashMap to maintain insertion order
Override removeEldestEntry method to limit cache size
Update the access order on get and put operations
Q12. Product of an array except self
Calculate the product of all elements in an array except for the element itself.
Iterate through the array and calculate the product of all elements except the current element.
Use two separate arrays to store the product of elements to the left and right of the current element.
Multiply the corresponding elements from the left and right arrays to get the final result.
Q13. Difference between POJO and Bean
POJO is a Plain Old Java Object with private fields and public getters/setters, while a Bean is a Java class with private fields and public zero-argument constructors.
POJO stands for Plain Old Java Object
POJO has private fields and public getters/setters
Bean is a Java class with private fields and public zero-argument constructors
Beans are usually used in Java EE frameworks like Spring for dependency injection
Q14. Write code to start 5 threads
Code to start 5 threads in Java
Create a class that implements the Runnable interface
Instantiate 5 objects of the class
Create 5 threads using the objects and start them
Q15. Write code to read a file
Code to read a file in Java
Use FileReader and BufferedReader classes to read the file
Handle exceptions using try-catch blocks
Close the file after reading using close() method
Q16. Singleton Pattern in details
Singleton pattern ensures a class has only one instance and provides a global point of access to it.
Ensures a class has only one instance by providing a global access point to it.
Uses a private constructor to restrict instantiation of the class.
Provides a static method to access the singleton instance.
Commonly used in scenarios where only one instance of a class is needed, such as database connections or logging.
Example: Singleton pattern can be implemented in Java using a pr...read more
Q17. Multiple window handles
Multiple window handles allow a browser to interact with multiple windows simultaneously.
Window handles are unique identifiers assigned to each window opened by a browser.
Using multiple window handles, you can switch between different windows, interact with their elements, and perform actions.
Example: driver.getWindowHandles() in Selenium returns a set of window handles for the current session.
More about working at Oracle
Interview Process at Tele Access E-services
Top Principal Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month