August 03, 2019

Oracle Interview Questions

  1. What is abstraction and encapsulation in java? (solution)
  2. If we didn't declare any exception in super class then in subclass can we declare any checked/custom exception.(solution)
  3. Can I have only try block in code? (solution)
  4. Why wait(), notify() and notifyAll() are defined in Object class? (solution)
  5. Can we override wait() or notify() methods? (solution)
  6. Difference between wait(), sleep() and yield()? (solution)
  7. What is the purpose of join()? (solution)
  8. Explain Singleton design pattern.
  9. Write a program to swap two numbers with out using third variable?
  10. Write a program to sort an array and remove duplicates? (solution)
  11. I have two arrays which contains integer. Write a program to merge those two arrays and remove duplicate elements? At the end, I need one array which should have unique elements?
  12. Write a program to print Fibonacci series? (solution)
  13. There is an array [1,2,5,4,8,3] and sum = 7. Find all the sub set array such that sum of elements is 7. e.g [1+2+4]=7, [2+5]=7, [4+3]=7.
  14. Find a number between 1 and 100, that generates longest series using following rules:if n is odd, next n = 3n + 1. If n is even, next n = n/2 and if n == 1, terminate.
  15. Write a code to reverse a string recursively.  (solution)
  16. Find the 3rd last node from a linkedlist.(solution)
  17. Explain the internal implementation of HashMap.(solution)
  18. Difference between Vector and ArrayList?(solution)
  19. Can I declare class as static?
  20. Can I declare class as private?
  21. How to make a class as immutable. (solution)
  22. What happens if I write return in try block? Will finally executes? (solution)
  23. What happens if write system.exit(), will finally block executes? (solution)
  24. Write a SQL query to find highest number from the table.
  25. Given Binary tree. Find whether its BST  (solution)
  26. What is the purpose of @Qualifier.  (solution)
  27. What is the difference between @RestController and @Controller.  (solution)
  28. Can I use Yaml file instead of application.properties.(solution)
  29. How can we read configurations from properties files.(solution)
  30. Can we have multiple pom.xml's? How can we configure it?
  31. How can we configure Swagger in a Spring Boot Project?
  32. What is API Gateway? (solution)
  33. Explain the steps for versioning the web-services?
  34. Types of Git merge strategies.

No comments:

Post a Comment