Department of CSE
CS2309 Java Lab
Viva Questions
1. What are the OOP Principles?
2. What is Encapsulation?
3. What is Polymorphism?
4. What is Inheritance?
5. What are the features of Java Language?
6. What is the need for Java Language?
7. What is platform independency?
8. What is Architecture Neutral?
9. How Java supports platform independency?
10. Why Java is important to Internet?
11. What are the types of programs Java can handle?
12. What is an applet program?
13. Compare Application and Applet.
14. What are the advantages of Java Language?
15. Give the contents of Java Environment (JDK).
16. Give any 4 differences between C and Java.
17. Give any 4 differences between C++ and Java.
18. What are the different types of comment symbols in Java?
19. What are the data types supported in Java?
20. What is the difference between a char in C/C++ and char in Java?
21. How is a constant defined in Java?
22. What is the use of final keyword?
23. What are the different types of operators used in Java?
24. What is short-Circuit operator?
25. What is labeled break?
26. What is the use of for each control structure?
27. What is the need for static variables?
28. What is the need for static methods?
29. Compare static constants and final constants.
30. Why is main method assigned as public?
31. Why is main method assigned as static?
32. What are the types of variables Java handles?
33. What are the relationships between classes?
34. What is the general form of a class?
35. What is the use of new keyword?
36. If ObjA1 is an object of class A created using new keyword, What does the
statement A ObjA2=ObjA1; mean?
37. What is a constructor?
38. What is the difference between a constructor and a method?
39. What is the use of this keyword?
40. What are destructors?
, 41. How is object destruction done in Java?
42. What is Garbage collection?
43. What is the use of finalize method?
44. Compare Garbage collection and finalize method?
45. How is it guaranteed that finalize methods are called?
46. What is method overloading?
47. What is a String in Java?
48. What is the difference between a String in Java and String in C/C++?
49. Name a few String methods.
50. What is the difference between Concat method and + operator to join strings?
51. What is String Buffer?
52. How does String class differ from the String Buffer class?
53. Name some methods available under String Buffer class.
54. Output of some expressions using String methods.
55. How will you initialize arrays?
56. What is arraycopy method? Explain with syntax.
57. What are the methods under Util.Arrays?
58. Use the array sort method to sort the given array.
59. Give the syntax for array fill operation.
60. What is vector? How is it different from an array?
61. What is the constraint for using vectors?
62. What is wrapper class?
63. What are the different access specifiers available in Java?
64. What is the default access specifier in Java?
65. What is a package in Java?
66. Name some Java API Packages.
67. Name some JavaDoc Comments.
68. What is CommandLine Arguments.
69.
70. Explain OOP Principles.
71. Explain the features of Java Language.
72. Compare and Contrast Java with C.
73. Compare and Contrast Java with C++.
74. Explain Constructors with examples.
75. Explain the methods available under String and String Buffer Class.
76. Explain the Date Class methods with examples.
77. Discuss in detail the access specifiers available in Java.
78. Explain the different visibility controls and also compare with each of them.
79. Explain the different methods in java.Util.Arrays class with example.
80. Explain Packages in detail.
81. Discuss the methods under Array Class.
82. Discuss some of the classes available under Lang package.
83. Illustrate with examples: static and final.
84. Explain method overriding with example program.
85. What is javaDoc? Explain the comments for classes, methods, fields and link.
86. Application Programs in Java.