Please i need some help with my programing assigment in Java Given the following
ID: 3787458 • Letter: P
Question
Please i need some help with my programing assigment in Java
Given the following code: import java.io.*; public class Th{ public static void main(Strinq arqv[1){ Th t = new Th () ; t.amethod(); } public void amethod(){ try{ ioCall(); }catch(IOException ioe){} } } What code would be most likely for the body of the ioCall method public void ioCall ()throws IOException{ DataInputStream din = new DataInputStream(System.in); din.readChar(); public void ioCall ()throw IOException{ DataInputStream din = new DataInputStream(System.in); din.readChar(); public void ioCall () { DataInputStream din = new DataInputStream(System.in); din.readChar(); } public void ioCall throws IOException(){ DataInputStream din = new DataInputStream(System.in); din.readChar(); }Explanation / Answer
Ans )1
Explanation:- In the amethod when he is calling iocall method, he is trying to handle the IOException. So iocall method must throw IOException
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.