Vous êtes sur la page 1sur 2

java developer questions for oracle

1. I have 10 servlets. I want to load only 3 of them. What should I do for this?
???
2. I have a JSP that prints Hello World. After first run I open the class file o
f the JSP by Decompiler and change the Hello World string to Hello India and sav
e as class file. What will be the output Hello World or Hello India.
3. Can we make ArrayList class's methods synchronized.
4. can we use our method instead of execute() method in Action class of Struts.
5. Is it necessary to override doGet() or doPost() methods in a servlet.
6. How can we handle the connection exhausted in JDBC.
7. what are checked and unchecked exceptions
8. who calls the run() method in a thread.
9. what is hashCode() and equals() method.
10. In HashSet duplicate entry how can we check.
11. what is ServletConfig and what is ServletContext
12. Servlet is loaded per user request or loaded once.
13. what is join() method in thread.
14. We have a column that have only names, duplicate values and nulls also there
. We want to save this in Collections and sort. What Collection class we must us
e.
15. What is abstraction and encapsulation in java ?
16. Method Overloading rules? Can we overload the super class method in sub clas
s. Discussion happened with the example.
17. Widening and narrowing in java? Discussion happened with example?
18. Why wait(), notify() and notifyAll() are defined in Object class?
19. Threads : producer and consumer problem?
20. Difference between wait(), sleep() and yield()?
21. Can we override wait() or notify() methods?
22. Explain about join() method in thread class
23. Have you faced out of memory error? If yes how you fixed ? Tell different sc
enarios why it comes?
24. Database connection leakage?
25. Write a program to swap two numbers with out using third variable?
26. Write a program to sort an array and remove duplicates?

27. Write a program on Singleton?


28. 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?
29. Write a program to fetch the data from a table using JDBC and result set?
30. How to get data from HashMap?
31. Difference between Vector and ArrayList?
32. Difference between sleep and wait?
33. Write a program to print Fibonacci series?
34. What is the use of finally block?
35. What is the use of final keyword?
36. Can i declare class as static?
37. What is static method and static variable?
38. Can I declare a class as private?
39. What happens if i write return in try block? Will finally executes? What hap
pens if write system.exit(), will finally block executes?
40. Why you want to change the company?
Nobody expect you tell the truth.. :-)

Vous aimerez peut-être aussi