0% found this document useful (0 votes)
15 views6 pages

Java Interview Questions

This document contains 101 questions about Java programming concepts including: - Java fundamentals like classes, objects, variables, methods, inheritance, polymorphism, exceptions - Java core APIs like collections, generics, I/O, concurrency - Differences between key concepts like interfaces vs abstract classes, ArrayLists vs LinkedLists, HashMaps vs TreeMaps - The document aims to assess knowledge of the Java language and platform from basic to advanced topics.

Uploaded by

madhu shree m
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
15 views6 pages

Java Interview Questions

This document contains 101 questions about Java programming concepts including: - Java fundamentals like classes, objects, variables, methods, inheritance, polymorphism, exceptions - Java core APIs like collections, generics, I/O, concurrency - Differences between key concepts like interfaces vs abstract classes, ArrayLists vs LinkedLists, HashMaps vs TreeMaps - The document aims to assess knowledge of the Java language and platform from basic to advanced topics.

Uploaded by

madhu shree m
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 6

1.

Explain the working of a Java Program (or) Explain


WORA Architecture (or) Prove how Java Platform
Independent.
2. Which Company started Java and who owns it now?
3. Name of the person who started Java.
4. Latest version of JDK and what are the latest
updates.
5. Difference between JDK, JRE, JVM.
6. 5 Features of Java.
7. What is class Loader?
8. Explain a java program with respect to command line
arguments.
9. What is a Class and an Object?
10. What is a Variable? Explain Data Types as well?
11. Explain different types of Blocks.
12. What do you mean by methods and different ways of
writing it? Are functions and methods the same?
13. Explain the Naming Conventions/Coding Standards
14. Explain Method Overloading? Can we Overload static
methods and main methods? Example for predefined
overloaded methods.
15. Explain Constructors, different types of
Constructors and Constructor Overloading.
16. Explain Constructor Chaining w.r.t same class and
another class.
17. Explain static keyword and non static.
18. What is Inheritance?
19. Explain the different types of inheritance.
20. What are the different Access Specifiers/Modifiers?
21. What is Encapsulation?
22. Explain the Specifications of Java Bean Class.
23. Explain Local and Member/Global Variables.
24. Explain this and super keyword.
25. Why Multiple Inheritance w.r.t Classes is not
possible in java?
26. Explain Method Overriding and it’s rules. Can we
override static methods in Java?
27. Is it possible to call C and C++ functions?
28. Difference between abstract and interface.
29. Explain Type Casting.
30. Explain Upcasting and Downcasting?
31. What is a ClassCastException and How do we avoid
it?
32. What is Polymorphism? Explain different types of
Polymorphism.
33. What is Abstraction?
34. What is abstract and interface?
35. Explain method binding.
36. Explain Generalization and specialization.
37. Can we have a Nested Method in Java?
38. What happens when a class implements two interfaces
having the same method name?
39. Explain the final keyword.
40. Difference between final method and private method.
41. Different ways of avoiding Inheritance?
42. What are the Ways to Avoid Object Creation?
43. Why does main() take String[] as an argument?
44. Why main() is static?
45. Name a few methods in Array.
46. Difference between for and for each loop.
47. How to make data read-only.
48. Explain JVM architecture.
49. Give Examples for primitive Data Types and non
primitive Data Types.
50. Difference between static and non static.
51. Explain different looping statements.
52. Explain Decision Making Statements.
53. Explain different types of Operators.
54. Explain Scanner Class and what are the methods in
order to accept different types of inputs
55. What are packages and explain structure.
56. Explain static import.
57. Explain Has-A relationship or Association.
58. Explain Inner classes and Program Anonymous Inner
class.
59. Difference between final, finally and finalize.
60. Explain Garbage Collection.
61. Can we Explicitly Invoke Garbage Collector?

Exceptions
62. Super most class in Exception Hierarchy and what is
error and what is an exception?
63. Types of exceptions and Example for Checked and
Unchecked.
64. Difference between throw and throws.
65. How to handle an exception and can we have try and
catch block inside finally block?
66. How do we create Custom Exception and how to make
Checked or Unchecked Custom Exception.
67. Can we write only try block without catch and
finally blocks?
68. Can we have a try block without a catch block? If
yes, how?
69. Can we have executable lines of code between try
and catch blocks.
70. Can we have nested try and catch blocks.
71. Can exceptions occur at compile time.
72. Difference between error and exception.
73. Can we handle multiple exceptions in single catch
blocks.
74. With throws can we use multiple exceptions.
75. Explain finally block.

LIBRARIES AND COLLECTIONS

76. Supermost class in java.


77. Few predefined libraries and what is java.lang
package?
78. Explain String and mutable version of String.
79. Difference between StringBuffer and StringBuilder.
80. Explain toString(), hashCode() and equals().
81. Explain System.out.println().
82. What is a framework?
83. What is collection and explain collection
hierarchy.
84. Diff between collection and collections.
85. Explain java equality contract.
86. Diff between ArrayList and LinkedList.
87. Diff between ArrayList and Vector.
88. Diff between List and Set.
89. Initial capacity of Arraylist and HashSet.
90. Explain autoboxing and unboxing.
91. Explain wrapper classes.
92. Explain Generics.
93. Constructors in ArrayList, LinkedList, Vector, and
HashSet.
94. Diff between Iterator and ListIterator.
95. Diff between HashSet and LinkedHashSet.
96. Diff between Comparable and Comparator.
97. Diff between TreeSet and HashSet.
98. When to use Arraylist and when LinkedList?
99. Explain maps and Differences between HashMap,
LinkedHashMap and TreeMap.
100. What is a thread and different ways of creating a
Thread.
101. How to read and write data into a file.

Any doubts or queries wrt any of the above questions drop


a mail to the below mail id : udaypawar037@gmail.com

You might also like