Professional Documents
Culture Documents
Java Questions
Java Questions
Datatypes
Type casting
Operators
DMS
1. What is DMS
2. List all the types and explain the syntax
3. What is switch
4. What is break statement
Loops
Methods
1. What is method
2. What is method header
3. What is method signature
4. What is access specifiers and return type
5. What is method calling statement
6. What is recursive method
7. What is method overloading
8. What is compile polymorphism
9. What is the diff between R method and loop
10. What is var arg
11. What is command line arg
12. How to pass a value to a method
13. How to read a value from a method
Arrays
Global members
Constructors
1. What is constructor
2. What is constructor overloading
3. What is constructor chaining
4. What is constructor calling statement
5. Difference between method and constructors
6. Explain types of constructors
7. Explain diff ways of accessing static and non static members in both the context
8. What is the use of constructors
OOPs
1. What is encapsulation
2. What is inheritance
3. What is datahiding ?explain getters and setters method
4. What is package
5. What is access specifiers and explain each
6. What is super()?explain in details
7. What is polymorphism? Explain compile time and run time polymorphism
8. What is method overriding
9. What is method shadowing
10. Explain diamond problem
11. Explain each type of inheritance
12. What is extends
13. What is abstraction
14. What is abstract class?explain in brief
15. What is interface?
16. What is the difference between interface and abstract class
17. What is the use of implements
18. What is final
19. Explain method overriding with access specifiers
20. Why main method is like public static void main(String []args)
Object class
String class
Scanner class
Wrapper class
Exceptions
Collections
1. What is collection
2. Explain the class hierarchy of collection
3. What is list
4. What is arraylist
5. What is comparable interface
6. How to add delete and read the objects from arraylist
7. What is the syntax of generic collection
8. What is the disadvantage of object type arraylist
9. How to sort the arryalist
10. How to sort in descending order
11. How to delete the duplicate object in arraylist
12. What is set
13. What is difference between hashset and treeset
14. How to sort hashset
15. What is the difference between list and set
16. What is foreach loop
17. What is iterator
18. Difference between add and addAll methods
19. What is map
20. What is hashMap and treeMap
21. Difference between hashMap and Treemap
22. How to iterate map
23. what is keyset()
24. what is values()
25. what is entrySet()