BCA Semester 3 – OOP in Java – Unit 8: I/O and Streams (2Hrs)
Comprehensive questions and detailed answers for Unit 8: I/O and Streams (2Hrs). Perfect for exam preparation and concept clarity.
a) Define multithreading. Write a java program to show the inter-thread communication.
b) Define Stream. Write a program in java to copy the content from one file to another.
a) List and explain any five String methods used in Java with examples.
b) Differentiate between byte stream and character stream. Write a program to copy the content of a file to another file using streams.
What is serialization? Write a java program to write three student information (Roll, Name,Address, College) into file student.txt and display the student information whose address is Jhapa.
Why we need file handling in java? Write java program to read file into a variable and then write a variable's content into another file.