Question
import java.io.*;// importing java input and output library public class IntStream {public static void main(String[] args) { // class called intstream or input stream //
import java.io.*;// importing java input and output library public class IntStream {public static void main(String[] args) { // class called intstream or input stream // TODO code application logic here try { FileInputStream inputStream = new FileInputStream(""); while(data != -1) { System.out.print((char)data); } inputStream.close(); } catch(Exception e) { System.out.println(e.toString()); } } }
a) I have provided you with the code template, a two statements are missing from the template.
Your task: b) You will create a text file and in the text file you will write a phrase of your choice, save the file
c) Write a java code of input stream which will stream the text on the console.
d) You will take the screen shots of your code, upload your code and the outputs in jpg or pdf format here.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started