1. Can you use writeInt to write a number to a file and then read that number using readLong? Can you read that number using readDouble? 2. Write a complete Java program that asks the user for the...


1. Can you use writeInt to write a number to a file and then read that number using readLong? Can you read that number using readDouble?


2. Write a complete Java program that asks the user for the name of a binary file and writes the first data item in that file to the screen. Assume that the first data item is a string that was written to the file with the method writeUTF.


3. Does the class FileInputStream have a method named readInt? Does it have one named readDouble? Does it have one named readUTF?


Q163.


Suppose that you want to create an input stream and connect it to the


binary file named mydata.dat. Will the following code work? If not how


can you write something similar that does work?


ObjectInputStream inputStream = new


ObjectInputStream("mydata.dat");

Nov 16, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here