Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Frequently Asked Questions

1. What is the difference between JRE and JVM?


2. What is JIT compiler?
3. What is Unicode system?
4. Can the program name and the class name be different in Java?
5. What does a .class file contain?
6. Should there be a main() method in every class?
7. Can we overload a main() method?
8. What does a constructor return?
9. Can we write a program in java without a main() method?
10. List out various usages of the ‘this’ keyword.
11. What type of Inheritance is supported by Java?
12. What is aggregation? Why is it used?
13. Can we override a Static method?
14. What is Covariant return type?
15. List out various usages of the ‘Super’ keyword.
16. Why is ‘instance initializer’ block used in Java?
17. What is a blank final variable?
18. What is a tagged interface?
19. What is run-time polymorphism or dynamic method
dispatch?
20. What is the difference between static binding and
dynamic binding? What does java support?
21. What is upcasting and downcasting?
22. What is object cloning?
23. What is the purpose of a private constructor?
24. What are the various ways to create an object in Java?
25. What are the various ways to dereference and object.
26. What is an anonymous object?
27. What is type promotion in Java?
28. What is ‘static’ keyword used for in Java?
29. Can we override a static method in Java?
30. Can we override the main method?
31. What is the difference between Overloading and
Overriding?
32. Can we override the Super class instance variables?
33. List out the various usages of the final keyword.
34. Can we inherit a Constructor method?
35. What is the difference between an Abstract class and an
Interface?
36. Can we inherit the Interface instance variables?
37. Can an Abstract class have non-abstract methods?
38. How many ways you can create a String in Java?
39. What is an Immutable and Mutable String?
40. Different ways to compare two Strings?
41. Difference between (= =) and (.equals) ?
42. What is a Regular Expression?
43. What is an Exception?
44. Different ways to handle Exception.
45. What is Multi tasking ?
46. What are the different ways to achieve multi tasking?
47. What is a Thread in java?
48. How many ways are there in java to do Multithreading?
49. What does the Thread.sleep() method do in JAVA?
50. What is a Stream in Java?
51. Mention the 3 different Streams that are available in the
System class in Java.
52. Syntax of FileInputStream/FileOutputStream.
53. What is FileReader and FileWriter.
54. What is the difference between FileInputStream and
FileReader?
55. Difference between AWT and SWING in Java?
56. What are the 2 ways to iterate the elements in a
Collection.
57. What is the difference between Iterator and Enumeration
interface in collection framework?
58. What is the difference between ArrayList and LinkedList
classes in collection framework?
59. What is Autoboxing and Unboxing in Java?
60. Syntax of For-Each loop.

You might also like