Face to Face Interview Series 28 java questions

Face to Face Interview Series 28 java questions

Face to Face Interview Series 28 java questions for Sr. Java Developer position in big technology company. Below are questions:

1. Can you mark interface methods synchronized?
2. Difference between Checked and Unchecked Exceptions?
3. What are checked and unchecked exceptions?
4. What are equal() and hashcode() methods in Java? Why you need it?
5. If you were to design exception handling of web application or any Java application then what would be your approach?
6. Difference between Abstract Class and an Interface? Which gives good performance and explain it?
7. What new Java 1.5 new features you have used? Which is your favourite?
8. What is difference between HashMap and Treemap?
9. Can you tell Exception class hierarchy?
10. What are different ways of sorting list Java?
11. How can you sort list where we have very complex objects?
12. How can you sort Map Java?
13. Have you used Java Comparator would you please explain it?
14. What is Abstract Class? What is Interface?
15. When do you use Abstract Class and When do you use Interface?
16. Can you create instances of Abstract Class?
17. What is difference between StringBuffer and StringBuilder?
18. What is difference between function overloading and overriding?
19. What is Encapsulation ?
20. What is difference between Abstract Class and an Interface in Java ?
21. When do you use an Abstract Class and why ?
22. How are constants defined in Abstract Class and in Interface ?
23. How are methods defined in Interface ?
24. Difference between equals() method and == in Java ?
25. When do you overwrite equalsTo() method?
26. What is type casting in Java? Explain with example?
27. What are checked and unchecked exceptions?
28. What happens if you do not catch checked exceptions?
29. If different complex objects are stored in list how to find out type of object when it is retrieved from list?
30. What are final, finally and finalize keywords in Java?Can methods in interface be private methods? Explain why?
31. What is the difference between static synchronized methods and non-static synchronized methods?
32. If you were to store all the license plates from New Jersey into Collection what Collection would you use?
33. What is criteria to choose collection?
34. Can you tell me at least 2 implementation of Set Interface?
35. What is difference between HashSet and TreeSet?
36. What is preemptive scheduling and time slicing in Java thread?
37. Do you know Big O notations? Also what is log(n) algorithm?
38. Difference between ArrayList and LinkedList?
39. Is your web application deployed in single JVM or multiple JVM?
40. How are transactions was handled within your web application?
41. How are Exceptions handled in your application?
42. Did you used any API for JSON conversion?
43. To perform operations on AtomicInteger synchronization is mandatory?
44. StackOverFlowException can be caused under what circumstances?
45. What are different types of mechanism used to acquire Lock on object?
46. What is the primary use of hashCode() and equals() method in Java?
47. What happens inside JVM when you synchronize method?
48. When does Operating System come into play in multi-threaded applications please explain?
49. Have you ever looked into source code of any open source projects? When and why?
50. Can you explain Java Exception hierarchy?
51. How do you create custom exceptions in Java?
52. Can you synchronize static methods in Java?
53. What is Immutability?
54. How can you make Class Immutable? what is the use of it please give real time example?
55. What is the underlying data structure for ArrayList?
56. What is the underlying data structure for LinkedList?
57. What is the difference between sleep and wait in Java Threads?
58. Can you obtain a lock on Class?
59. How does JVM treat AtomicIntegers in the context of Java Threads?
60. Please explain internal working of JVM?
61. What are final finally and finalize keywords in Java?
62. What is the process to persist data in Java?
63. What is the difference between StringBuffer and StringBuilder?
64. How can you convert String of comma separated values that were imported from a CSV file into an Array?
65. How can you remove duplicates from Array?
66. After removing duplicates how you convert Array of Strings back into single String without commas?
67. After removing duplicates how convert Array of Strings back to single String separated by dashes?
68. Does Java support multiple inheritance? Please explain with example?
69. How can you simulate multiple inheritance in Java? Can you provide an example?
70. What is garbage collection in Java?
71. How is garbage collection performed in Java?
72. What is caching? What should be your consideration for designing caching mechanism?
73. If you were to implement your own caching mechanism what would some of the API calls look like?
74. What effect does key word “synchronized” have when used in method declaration?

Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *