(1)Can a program only read one object from a file? What if I have multiple objects serialized to one file, but I only want to read one or two of those objects? Is there a way to dictate which object gets serialized?
(2) When creating a file object, you include the file name enclosed in quotation marks as an argument to the constructor of the object. Is it possible to substitute a
string variable with the name of the file as the string value, or do you have to use the file name itself?
Example:
String fileName= "testfile.dat"
File fileHolder = new File(String fileName)
(3) When writing data to a file, can you use a custom file extension, or do you have to use an existing file extension like .txt or .csv?
Thanks for all the help,
Landon