Qtr No. 213, New Town Yehlanka Indore 454775
Assuming all the necessary imports are done, predict the output of the below code:
public class FileStreamDemo {
public static void main(String[] args) throws Exception {
FileOutputStream fos = new FileOutputStream("sample.txt");
String text = "Java Basics";
byte[] b = text.getBytes();
fos.write(b);
FileInputStream fis = new FileInputStream("sample.txt");
int i = fis.read();
System.out.println((char)i);
fos.close();
fis.close();
}
}
J
Java
Java Basics
Basics
To get all Infosys Certified L1 Junior Java Programmer Exam questions Join Group https://bit.ly/infy_premium_group
We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.
Qtr No. 213, New Town Yehlanka Indore 454775
admin@prepflix.in