Oracle Interview
Oracle Interview
com/in/bishnoisuresh/
2. Explain how Java manages memory. What is the role of the heap and stack?
Hint: Stack is for method calls and local variables; the heap stores objects.
4. What are weak references in Java, and where are they used?
Hint: Useful for memory-sensitive caches, where the object can be garbage collected.
6. Explain the significance of immutability in Java and how to create an immutable class.
Hint: No setter methods, use final variables, and ensure deep copies for mutable fields.
8. What are some best practices for using the Stream API?
Hint: Avoid side effects, prefer immutability, and leverage parallel streams cautiously.
9. How does the Java Reflection API work, and when would you use it?
Hint: Inspect or modify classes, methods, and fields dynamically. Useful in frameworks.
10. What is the difference between the Fork/Join framework and the ExecutorService?
Hint: Think about task decomposition and parallelism.
LinkedIn: https://www.linkedin.com/in/bishnoisuresh/
LinkedIn: https://www.linkedin.com/in/bishnoisuresh/
13. What is the role of a distributed tracing tool like Jaeger or Zipkin in Microservices?
Hint: Tracks requests across multiple services to debug performance bottlenecks.
15. Explain the concept of API versioning. How do you handle backward compatibility?
Hint: Use version numbers in URLs or headers, and deprecate old versions gracefully.
18. What are some strategies for logging in distributed systems? (E.g., Correlation IDs)
Hint: Correlation IDs link logs across services to trace workflows.
19. Explain the purpose of container orchestration tools like Kubernetes in Microservices.
Hint: Manages deployment, scaling, and load balancing of containerized applications.
21. How does indexing improve query performance? What are the trade-offs?
Hint: Speeds up lookups but increases storage and write overhead.
23. Explain the differences between relational (SQL) and document-based (NoSQL) databases.
Hint: SQL is structured and relational; NoSQL is schema-less and flexible.
24. How does optimistic locking work? How does it differ from pessimistic locking?
Hint: Optimistic assumes no conflicts; pessimistic locks rows to prevent them.
26. How would you design a database schema for a Microservices application?
Hint: Each service owns its data and uses its database for isolation.
27. What is a secondary index, and when would you use it?
Hint: Speeds up queries for non-primary key fields.
28. How does caching work in databases, and what are some tools to implement it?
Hint: Stores frequently accessed data in memory; tools include Redis, Memcached.
30. How do you migrate data between two database versions or structures without downtime?
Hint: Use blue-green deployments, shadow tables, or phased migration strategies
LinkedIn: https://www.linkedin.com/in/bishnoisuresh/