Professional Documents
Culture Documents
S.Y.B.C.A. SEM - IV
Paper - 1020201403 Programming in Core Java
Question Bank
UNIT - 4 Packages
126. Explain the concept of packages in Java and their importance in code organization.
127. Discuss the guidelines for naming packages in Java. Are there any naming
conventions to follow?
128. What is the purpose of type imports in Java packages? How do they simplify code?
129. Explain the concept of package access in Java. How does it control the visibility of
classes and members?
130. Describe the contents of a Java package. What can be included in a package besides
classes?
131. Define the term "package object" in Java. What role does it play in package
management?
132. Discuss the specifications for creating and maintaining a package in Java.
133. Explain the steps involved in creating a package in Java, including directory structure
and file organization.
134. What is the purpose of the package-info.java file in Java packages? How is it used?
135. Discuss the benefits of using packages in large-scale Java projects.
UNIT - 6 Exceptions
161. What is an exception in Java? Explain its significance in error handling.
162. Discuss the difference between checked and unchecked exceptions in Java.
163. Explain the role of the Throwable class hierarchy in Java exception handling.
164. Describe the consequences of unhandled exceptions in Java programs.
165. How can exceptions help in identifying and resolving runtime errors in Java?
166. Enumerate and explain the categories of built-in exceptions in Java.
167. Discuss the process of creating user-defined exceptions in Java.
168. Provide examples illustrating the creation and usage of custom exceptions in Java.
169. How can you handle exceptions thrown by methods that you call in your Java code?
170. Discuss the best practices for designing and using custom exceptions in Java.
171. Explain the difference between the throw and throws keywords in Java exception
handling.
172. Discuss the usage of the throw keyword to explicitly throw exceptions in Java.
173. Describe the purpose of the throws clause in method declarations.
174. Provide examples demonstrating the use of the throw and throws keywords in Java
code.
175. Discuss scenarios where you would use throw and throws in Java programs.