Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Shivaji University, Kolhapur

Question Bank for Mar 2022 (summer) Examination

Subject Code: 82866 Subject Name: Java Programming


Common subject Code (if any) ______________________________________

1. __________driver converts JDBC method calls into native calls of the database API.
A. Native-API
B. JDBC-ODBC bridge
C. Network Protocol driver
D. Thin driver

2. What is garbage collection in the context of Java?


A. Java deletes all unused java files on the system.
B. Memory used by the object with no reference is automatically reclaimed.
C. The JVM cleans output of Java program with error.
D. Any unused package in a program automatically gets deleted.

3. In_________________ hidden (invisible) textfield is used for maintaining the state of an


user.
A. Hidden Form Field
B. Cookies
C. URL Rewriting
D. HttpSession

4. Which of these access specifiers can be used for a class so that its members can be
accessed by a different class in the different package?
A. Public
B. Protected
C. Private
D. No Modifier

5. Binding (or wrapping) code and data together into a single unit are known as ________.
A. Polymorphism
B. Inheritance
C. Encapsulation
D. None of these

6. ___________is the default port used by RMI Registry?


A. 1099
B. 1090
C. 1009
D. 1109
7. Which of the following packages is used to includes utility classes like Calendar,
Collection, Date?
A. java.lang
B. java.net
C. java.awt
D. java.util

8. In java bean _________method will take only one parameter whose type with be the same
as that of data member
A. get()
B. set()
C. Both get() and set()
D. None of these

9. Which cookie it is valid for single session only and it is removed each time when the user
closes the browser?
A. Persistent cookie
B. Non-persistent cookie
C. Both Non-persistent and persistent cookie
D. None of these

10. What is the process of defining a method in subclass having same name & type signature
as a method in its superclass?
A. Method overloading
B. Method overriding
C. Method hiding
D. None of these

11. In MVC __________handles processing of an application.


A. Model
B. View
C. Controller
D. None of these

12. Which tag is used to execute java source code in JSP?


A. Declaration Tag
B. Scriptlet tag
C. Expression tag
D. None of these

13. Package in Java is a mechanism to encapsulate a ______________.


A. Classes
B. Sub Packages
C. Interfaces
D. All of these
14. JSP stands for__________________.
A. Java Server Pages
B. Java Server Provider
C. Java Service Provider
D. Java Service Pages

15. In servlet_________method is called only once.


A. init()
B. service()
C. destory() and init()
D. None of these

16. What does an interface contain_____.


A. Method defination
B. Method declaration
C. Both Method defination and declaration
D. None of these

17. JSF life cycle contains___________.


A. Restore view phase
B. Apply request values phase
C. Invoke application phase
D. All of these

18. What are the major components of the JDBC?


A. DriverManager, Statement, and ResultSet
B. DriverManager, Driver, Connection, and Statement
C. DriverManager, Driver, Connection, Statement, and ResultSet
D. DriverManager, Connection, Statement, and ResultSet

19. Which of the following is type of JDBC driver?


A. Type1
B. Type2
C. Type3
D. All of these

20. ________is a Java run-time system that chooses to execute the JAVA Bytecode.
A. SDK
B. JDK
C. JVM
D. None of these

21. What is the synatx of JSP Page directive?


A. <%@ page…%>
B. <% page…%>
C. <!@ page…!>
D. None of these

22. An RMI Server is responsible for________________.


A. Creating an instance of the remote object
B. Exporting the remote object
C. Binding the instance of the remote object to the RMI registry
D. All of these

23. Which method of the Naming class (found in java.rmi) is used to update the RMI registry
on the server machine?
A. rebind ()
B. lookup()
C. lookup() And rebind ()
D. None of these

24. During ____________ phase, the JSF processes all validators registered on component
tree
A. Process validations
B. Render response
C. Update model values
D. None of these

25. Which of the following are the life cycle methods of jsp?
A. jspInit()
B. jspService()
C. jspDestroy()
D. All of these

26. Java uses two stage system for program execution. They are___________
A. Compiler and interpreter
B. Copy and compiler
C. Compiler and instruction
D. None of these

27. All Interface methods in Java are ____ by default.


A. public
B. abstract
C. public and abstract
D. None of these

28. Which of the following is not a Java features?


A. Architecture Neutral
B. Use of pointers
C. Object-oriented
D. Dynamic
29. _________keyword is used while using interface
A. Extend
B. implements
C. throw
D. throws

30. Which of the following is the life cycle method of jsp?


A. jspInit()
B. jspService()
C. jspDestroy()
D. All of these

31. System.out.println()this is a/an_______________method


A. main
B. overridden
C. simple
D. overloaded

32. Which of these Exceptions is thrown by remote method?


A. RemoteException
B. InputOutputException
C. RemoteAccessException
D. RemoteInputOutputException

33. In J DBC____________imports all Java classes concerned with database connectivity.


A. javax.sql.*
B. java.mysql.*
C. java.sql.*
D. com.*

34. An RMI Server is responsible for________________.


A. Creating an instance of the remote object
B. Exporting the remote object
C. Binding the instance of the remote object to the RMI registry
D. All of these

35. Which method of the Naming class (found in java.rmi) is used to update the RMI registry
on the server machine?
A. rebind ()
B. lookup()
C. lookup() And rebind ()
D. None of these
36. __________beans contain only the code part
A. Non-visual
B. Visual
C. Both Non-visual and Visual
D. None of these

37. In java scope of variable declared inside method is known as________.


A. global
B. external
C. virtual
D. local

38. What is bytecode?


A. Machine-specific code
B. Machine-independent code
C. Java code
D. None of these

39. Which is not a directive?


A. include
B. page
C. export
D. useBean

40. What is an ORM stands for?


A. Object Rate Mapping
B. Object Relational Mapping
C. Operating Related Mapping
D. Operating Rate Mapping
Descriptive Questions
1. What are the different features of Java?
2. How to compile and execute java program explain with example.
3. What is Byte code? Explain architecture of JVM with suitable diagram
4. Elaborate abstraction, Encapsulation and polymorphism in java.
5. Define Inheritance. Explain different types of inheritance in java.
6. Difference between package and interface in java
7. What is Interface? Explain java inner classes.
8. What is constructor? Explain default constructor with example.
9. Define constructor. Explain parameterized constructor with example.
10. Explain Garbage collector with example
11. Explain Method Overloading with example
12. Explain Method Overriding with example
13. What is Package? How to implement a package in java explain with example.
14. Explain utility classes and collection classes with example
15. Define Package? Explain user defined and built in package.
16. Explain steps of java database connectivity.
17. Explain Type1 and Type2 driver.
18. Explain Thin driver with its advantages and disadvantages
19. Explain Network protocol driver with its advantages and disadvantages
20. Explain steps to create JDBC application.
21. Discuss Resultsets and callable statements.
22. Explain prepared statement interface with example.
23. What is connection pooling? Discuss benefits of connection pooling.
24. Differentiate between servlet and CGI
25. Explain doGet and doPost method with example.
26. Define Servlet. Elaborate servlet life cycle
27. Explain life cycle of servlet with its uses.
28. Explain any four service methods of servlet with example
29. Differentiate between Generic servlet and HTTPServlet,
30. Define Cookies. Explain working of cookies.
31. Elaborate techniques of session tracking.
32. Explain Hidden Form Field and URL Rewriting in brief.
33. Elaborate request dispatching with example
34. What is RMI? Elaborate architecture of RMI.
35. Explain Stubs & skeleton in RMI.
36. Explain steps for creating RMI application.
37. Discuss Parameter passing in remote methods (marshalling and unmarshalling)
38. What is Java Beans? Explain types of beans.
39. Define Java Beans. What are the different advantages and disadvantages of java beans?
40. Discuss design pattern and Beans persistence.
41. Define Java Server Pages .Elaborate uses of JSP.
42. Explain JSP Architecture with suitable diagram
43. Discuss different JSP tags with example
44. Differentiate between Implicit and Explicit objects
45. Discuss use of Beans in JSP and their scopes.
46. What is JSF? Explain architecture of JSF.
47. Elaborate components of JSF.
48. Discuss Benefits of JSF.
49. What is Hibernate? Explain its framework.
50. Explain working on Hibernate framework.
51. Define Hibernate. Explain advantages of hibernate.
52. Discuss different advantage and disadvantage of hibernate.
53. Define Struts. Explain Architecture of Struts framework.
54. Struts frameworks Components.
55. What is spring? Explain Spring framework in brief.
56. Elaborate components of spring framework.
57. Discuss advantages and disadvantages of spring.
58. Elaborate Spring MVC Architecture,
59. Discuss benefits of using Spring with Hibernate,
60. Elaborate Working with Hibernate objects.

You might also like