Q75
What will be the output of the following Java program? import java.io.FileOutputStream; public class FileOutputStreamExample public static void main(String args[]) try FileOutputStream fout=new FileOutputStream("D:\ .txt"); String s="Welcome to India."; byte b[]=s.getBytes();//converting string into byte array fout.write(b); fout.close(); System.out.println("Success"); catch(Exception e)System.out.println(e);
A.
"Success" to the output and "Welcome to India" to the file
AnswerB.
only "Welcome to India" to the file
C.
compile time error
D.
No Output
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board