Friday, July 27, 2018

Java & Spring Interview Questions

  1. Can Interface have static methods?
  2. What's difference between Interface with default method and Abstract class?
  3. If java is not allowing creating default method in Interface then what is use of abstract classes?
  4. Can a class have method with same name as that of constructor?
  5. Try{} finally{} will it work without a catch statement?
  6. try{ return 1; } finally{ return 2; }
    What will be the output? 
    1. Compilation error 
    2. 1 will be returned
    3. 2 will be retruned
    4. Unreachable return statement
  7. What is difference between String equals and == 
  8. Design problem - You have a remote DB having millions of records on which we have no control and you need to query it for data like you send id and wait for a value which hours to return. How will you get around this situation. You can replicate whole remote DB as it has trillions of data. 
  9. Design problem: You show the stock and prices. There are bunch of stocks who's price may change every millisecond. You are pulling this info from other DB, where you have no control.
  10. Design problem  -  Design a snake and ladders game. Tell what data structure you will use.
  11. Can you override a static method?
  12. How Hashmap works?
  13. What java collections you have worked with?
  14. What is difference between ArrayList and LinkedList
  15. What is difference between @RestController and @Controlle
  16. Which modules you worked on?
  17. What benefits spring jdbc provides over jdbc?
  18. what happens if the request is sent on the server.
  19. How can you control what loads when in an ExtJS page.
  20. HTML life cycle
  21. Javascript Singleton vs. observer
  22. Ext JS version 5 vs. 4.
  23. What is MVC and how it is useful?
  24. What is lazy loading?
  25. How do create and object and extend it?
  26. Can you extend a singleton object in javascript?
  27. What is difference between having and where clause.
  28. Can you have where, group by and having together
  29. What does spring boot provide? convention over configuration, get you up and running quickly, stand-alone production grade apps
  30. How to avoid serialising a subclass?
  31. How many objects will be created in sb.append(“Ram”).append(“shyam”).append(“mohan”);
  32. What is supper interface of collection?
  33. What characteristics Employee need to have to be candidate for hashmap keys?
  34. Immutable, equals, hashmap
  35. Whats new in Java 7?
  36. What is executer & executers?
  37. What is difference between Cylindrical and….latches
  38. What is adapter design pattern - How will you achieve ListIterator functionality with Iterator?
  39. Hibernate:
  40. Diff. between get and load?
  41. What is detached, how to reattach?
  42. Spring:
  43. how to provide dependancy of type prototype to singleton?

No comments:

Post a Comment

Calculating Server Capacity: A Comprehensive Tutorial

 In this tutorial we will explore the process of calculating server capacity. Let's get started. Understanding Server Capacity Identifyi...