Java Questions to increase your knowledge base
__________________________________________
1. What are the main features of java?
2. How java is different from C++.
3. Why java is called purely object oriented programming or OOP?
4. What is byte code and how it helps the portability of java programming language?
5. Why java is called strongly typed language?
6. What are primitive data types?
7. Explain java class loaders? Explain dynamic class loading?
8. What is an abstract class? Give example
9. What are singleton classes? Give example
10. What are anonymous classes? Give example
11. What are wrapper classes in java? Give example
12. What do you mean by immutable classes in Java? Give example
13. Define access modifiers
14. What is a constructor? Why do we overload a constructor
15. What is copy constructor? Why do we need it
16. What is difference between constructor and method
17. What is a Meta class? Cite suitable example
18. What is a package? Why do we need it
19. Define Encapsulation
20. Define Inheritance?
21. What are the advantages of inheritance?
22. Explain inheritance and composition with example
23. What is difference between composition and aggregation
24. What is an interface and its use
25. Define polymorphism
26. What is difference between overloading and overriding? Give example
27. What is casting
28. What is final, finalize () and finally? OR What is difference between final, finalize () and finally?
29. What is the use of “this” and “super” keywords?
30. What is serialization? What is transient variable?
31. What is java collection framework
32. What is difference between an ArrayList and a Vector?
33. What is difference between Hashmap and Hashtable?
34. What is difference between a string and a string buffer class?
35. How does java allocate stack and heap memory? Explain re-entrant, recursive and idempotent methods/functions?
36. Explain Outer and Inner classes in java? When will you use an Inner class?
37. What is a singleton pattern? How do you code it in java?
38. What is factory pattern?
39. What do you mean by streams in java?
40. What is difference between Stream Tokeni
zer and String Tokenizer?
41. What is the purpose of Stream Tokenizer and why it is used? Explain.
42. What is Buffered Reader class? Explain.
43. What is difference between process and thread?
44. What are the different ways of creating threads in java?
45. Explain Thread life cycle in java.
46. How threads are interrupted in java? Explain.
47. What is Thread prioritization? How it is done in java
48. What is the significance of join () and alive () method in java?
49. What is the significance of sleep () and yield () methods in java?
50. What is difference between notify () and notifyAll () method of the object class?
51. What do you mean by synchronization? How java handles the synchronization problem in concurrent programming.
52. When you will synchronize a piece of your code?
53. What are exceptions in java? For what purpose they are used?
54. What is difference between exception and error?
55. What is user defined exceptions in java. Give example.
56. What do you mean by checked (compile time) and unchecked (runtime) exception? Give examples
57. What is difference between throw and throws clause?
58. Give any three runtime exception classes available in the java language API.
59. What are exception stack traces in java? Give examples of some of the stack traces provided by the java language API.
60. What is garbage collection and how to call it explicitly?
61. What do you know about the java garbage collection? When the garbage collection does occur?
62. Explain different types of references in java?
63. What is a Socket? How do you facilitate inter process communication in java?
64. What is the main difference between pass-by-reference and pass-by-value?
65. Explain the java I/O streaming concept and the use of decorator design pattern in java I/O?
__________________________________________
1. What are the main features of java?
2. How java is different from C++.
3. Why java is called purely object oriented programming or OOP?
4. What is byte code and how it helps the portability of java programming language?
5. Why java is called strongly typed language?
6. What are primitive data types?
7. Explain java class loaders? Explain dynamic class loading?
8. What is an abstract class? Give example
9. What are singleton classes? Give example
10. What are anonymous classes? Give example
11. What are wrapper classes in java? Give example
12. What do you mean by immutable classes in Java? Give example
13. Define access modifiers
14. What is a constructor? Why do we overload a constructor
15. What is copy constructor? Why do we need it
16. What is difference between constructor and method
17. What is a Meta class? Cite suitable example
18. What is a package? Why do we need it
19. Define Encapsulation
20. Define Inheritance?
21. What are the advantages of inheritance?
22. Explain inheritance and composition with example
23. What is difference between composition and aggregation
24. What is an interface and its use
25. Define polymorphism
26. What is difference between overloading and overriding? Give example
27. What is casting
28. What is final, finalize () and finally? OR What is difference between final, finalize () and finally?
29. What is the use of “this” and “super” keywords?
30. What is serialization? What is transient variable?
31. What is java collection framework
32. What is difference between an ArrayList and a Vector?
33. What is difference between Hashmap and Hashtable?
34. What is difference between a string and a string buffer class?
35. How does java allocate stack and heap memory? Explain re-entrant, recursive and idempotent methods/functions?
36. Explain Outer and Inner classes in java? When will you use an Inner class?
37. What is a singleton pattern? How do you code it in java?
38. What is factory pattern?
39. What do you mean by streams in java?
40. What is difference between Stream Tokeni
zer and String Tokenizer?
41. What is the purpose of Stream Tokenizer and why it is used? Explain.
42. What is Buffered Reader class? Explain.
43. What is difference between process and thread?
44. What are the different ways of creating threads in java?
45. Explain Thread life cycle in java.
46. How threads are interrupted in java? Explain.
47. What is Thread prioritization? How it is done in java
48. What is the significance of join () and alive () method in java?
49. What is the significance of sleep () and yield () methods in java?
50. What is difference between notify () and notifyAll () method of the object class?
51. What do you mean by synchronization? How java handles the synchronization problem in concurrent programming.
52. When you will synchronize a piece of your code?
53. What are exceptions in java? For what purpose they are used?
54. What is difference between exception and error?
55. What is user defined exceptions in java. Give example.
56. What do you mean by checked (compile time) and unchecked (runtime) exception? Give examples
57. What is difference between throw and throws clause?
58. Give any three runtime exception classes available in the java language API.
59. What are exception stack traces in java? Give examples of some of the stack traces provided by the java language API.
60. What is garbage collection and how to call it explicitly?
61. What do you know about the java garbage collection? When the garbage collection does occur?
62. Explain different types of references in java?
63. What is a Socket? How do you facilitate inter process communication in java?
64. What is the main difference between pass-by-reference and pass-by-value?
65. Explain the java I/O streaming concept and the use of decorator design pattern in java I/O?
More Questions will be added soon... keep watching this blog.


