Question: Predict the output of the following program? import java.io.*; public class Test { public static void main(String[] args) throws IOException { try ( }

Predict the output of the following program? import java.io.*; public class Test

Predict the output of the following program? import java.io.*; public class Test { public static void main(String[] args) throws IOException { try ( } FileOutputStream foutstrm=new FileOutputStream("C:\\testout.txt"); DataOutputStream output = new DataOutputStream(foutstrm); output.writeUTF("John Smith"); output.writelnt(85); try ( } } FileInputStream finput-new FileInputStream("C:\\testout.txt"); DataInputStream Input = new DataInputStream(finput); System.out.println(input.readUTF()+*+ Input.readInt();

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

There are several syntax errors in the given code snippet Heres the corr... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!