Home / MCQ Bank / Computer
Computer Java Serialization And Networking Difficulty: Medium

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:\\example.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);} } }

Select the correct option to test your answer:

More Computer Questions

VAB stands for___________? Which of the following will return the new element at the end of container? In negative logic, the logic state 1 corresponds to What is the primary purpose of the `@PostConstruct` annotation in Java EE applications? Which data collection method involves gathering data by directly interacting with subjects or participants?