Assignment 2 - Programming in java

  1. What is the difference between byte streams and character streams in Java? Provide examples.

  2. Explain the role of InputStream and OutputStream classes in Java I/O. How are they used?

  3. Describe the significance of FileInputStream and FileOutputStream. How do they help in file handling?

  4. What are stream filters in Java? How do they enhance the functionality of streams?

  5. Explain the use of BufferedReader and BufferedWriter. How do they help in stream filtering?

  6. How does the DataInputStream filter raw data from an input stream?

  7. What is the difference between a regular stream and a buffered stream in Java?

  8. Discuss the advantages of using buffered streams, such as BufferedReader and BufferedWriter, over unbuffered streams.

  9. Explain the BufferedInputStream and BufferedOutputStream classes. How do they work internally?

  10. How does buffering help in improving the performance of reading and writing data in Java?

  11. What is a PrintStream in Java, and how does it differ from other output streams like FileOutputStream?

  12. How does PrintStream handle automatic flushing? What are the advantages of this feature?

  13. Explain how PrintStream can be used to write formatted data to a file. Give an example.

  14. What is a Random Access File in Java? How does it differ from a regular file stream?

  15. Describe how to read and write data at specific positions in a file using RandomAccessFile.

  16. How does the seek() method work in a RandomAccessFile class? Provide examples of its usage.

  17. What is JDBC? Explain its architecture with examples.

  18. How do you establish a connection to an Oracle database using JDBC? Discuss the necessary steps.

  19. Explain the process of connecting to a MS-SQL Server database via JDBC.

  20. Describe how you can interact with a MS-Access database in Java using JDBC.

  21. What are the different types of JDBC drivers? Discuss the advantages and disadvantages of each type.

  22. What is object serialization in Java? How does it help in persisting objects?

  23. Explain the concept of Serializable interface. How does it affect the serialization of objects?

  24. Discuss the role of ObjectInputStream and ObjectOutputStream in the serialization process.

  25. What is a socket in Java? Explain how client-server communication is established using sockets.

  26. Discuss how the ServerSocket and Socket classes are used to implement client-server communication in Java.

  27. What is the significance of input and output streams in socket programming? How do they facilitate communication between a client and server?

  28. Explain the concept of a multithreaded server in Java. How do threads improve the performance of a server application?

  29. What is Remote Method Invocation (RMI) in Java? How does it enable communication between different JVMs?

  30. Discuss the process of creating and using an RMI server and client. What are the essential components of RMI?

  31. What is Java Native Interface (JNI)? How does it allow Java code to interact with native applications and libraries?

  32. What is the Collection API in Java? Discuss the different interfaces that make up the Collection framework.

  33. Explain the role of the Vector class. How does it differ from an array in Java?

  34. Describe the Stack class in Java. How is it used to implement a stack data structure?

  35. How does the Hashtable class work in Java? Explain the concept of hashing and how it is implemented in Hashtable.

  36. What are enumerations in Java? How are they used and why are they preferable to constants in some cases?

  37. Explain the difference between Set, List, and Map interfaces in Java with examples.

  38. What is the purpose of the Iterator interface in Java? How does it enhance the traversal of collections?

  39. How does the HashSet class in Java ensure uniqueness of elements? Provide an example.

  40. Discuss the usage and benefits of the LinkedList class in Java. How does it differ from ArrayList?

No comments:

Post a Comment