Question: Given that the file is a File object, which of the following are legal statements to create a new file? (i) file.create(); (ii) FileOutputStream fos
Given that the file is a File object, which of the following are legal statements to create a new file?
(i) file.create();
(ii) FileOutputStream fos = new FileOutput Stream(file);
(iii) FileWrter out = new FileWriter(file);
(iv) FileInputStream fis = new FileInput Stream(file);
(v) RandomAccessFile raf = new Random AccessFile(file);
(a) (ii), (iii) and (iv)
(b) (ii), (iv) and (v)
(c) (ii) and (iii)
(d) (ii), (iii) and (v)
Step by Step Solution
3.49 Rating (166 Votes )
There are 3 Steps involved in it
d ... View full answer
Get step-by-step solutions from verified subject matter experts
