Correctly answer the questions on the photo. 1) A class has to be tagged to allo
ID: 670231 • Letter: C
Question
Correctly answer the questions on the photo.
1) A class has to be tagged to allow objects of this class to be serialized and deserialized using ObjectOutputStreams and ObjectIlnputStreams, into files. a. Streamable, text b. Serializable, text c. Streamable, binary d. Serializable, binary 2) //Writing data to a file import java.util.*:; public class WriteToTextFile02 {public static void main(String[] args) try Formatter output- new Formatter("taxes.txt"); output. format("1001 1000.50%n1002 500.23%n 1003 78.12%n"); output.close); catch(Exception e) System.out.println("Error working with file"); //end of mainO //end of class For the program above, if the file 'taxes.txt' exists: a. b. c. d. Three lines of data will be added at the end of the file, after the original content. Original content of the file will be erased, and file will now contain three lines of data. An exception will occur None of the above.Explanation / Answer
As It Is Photo I am Directly Giving You Answers Below.
Answers:
1)option b ( i.e Serializable,text)
Explanation: To transfer object which consists of data over network object must be diminished and transfered can be done by Serializable interface.
2)option b (i.e Original content of the file will be erased,and file will now contain three lines of data.)
Explanation: Formatter class creates the file with the given file name and output.format method erases the old content of the given file and replaces with new current data which is given.