OOPs Through Java Assignments (3,4,5)
OOPs Through Java Assignments (3,4,5)
Assignment III
2-Mark Questions:
5-Mark Questions:
1. Discuss the various operations that can be performed on arrays, including searching and sorting.
Provide examples for each.
2. Explain the different types of inheritance supported in Java (single, multiple, multilevel, hierarchical,
hybrid) with examples.
3. Describe method overriding and provide a code example demonstrating this concept.
4. Define abstract classes and interfaces. How do they differ in their usage, and when would you use
each?
Assignment IV
2-Mark Questions:
5-Mark Questions:
1. Discuss the significance of the java.lang package and its commonly used classes.
2. Explain the hierarchy of standard exception classes in Java. Provide examples of checked and
unchecked exceptions.
3. Describe the use of try, catch, and finally blocks in exception handling with a code example.
4. Explain the difference between byte streams and character streams in Java, and provide examples of
each.
Assignment V
2-Mark Questions:
2. What methods are available in the String class for modifying strings?
5-Mark Questions:
1. Discuss string comparison and manipulation methods in Java. Provide examples of at least three
methods.
2. Explain the concept of multithreading and its importance in modern applications. Provide a real-
world example where multithreading is beneficial.
3. Describe the steps to establish a JDBC connection to a database. Include code snippets to illustrate
the process.
4. Explain inter-thread communication in Java and discuss the methods wait(), notify(),
and notifyAll() with examples.