MCQOPTIONS
Bookmark
Saved Bookmarks
→
Java Programming
→
Exceptions
→
Does close() implicitly flush() the stream...
1.
Does close() implicitly flush() the stream.
A.
False
B.
True
C.
NA
D.
NA
E.
NA
Answer» C. NA
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What is the correct option with regards to below snippet?<br><pre class="prettyprint lang-c">interface NewCustomer <br>{<br>}<br>class RegCustomer implements NewCustomer <br>{<br>}<br>class QuickCustomer implements NewCustomer <br>{<br>}<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">interface Calculation <br> {<br> int var = 0;<br> void calculate(int num);<br> }<br> <br> class display implements Calculation <br> {<br> int p;<br> public void calculate(int num)<br> {<br> if (num<2)<br> {<br> p = var;<br> }<br> else<br> {<br> p = num * num; <br> }<br> }<br> }<br> <br>public class interfaces_Example<br> {<br> <br> public static void main(String args[]) <br> {<br> display[] array = new display[4];<br> <br> for(int k=0; k<4; k++)<br> array[k] = new display();<br> array[0].calculate(0); <br> array[1].calculate(2);<br> array[2].calculate(4);<br> System.out.print(array[0].p+" " + array[1].p + " " + array[2].p);<br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">interface Calculation<br> {<br> void calculate(int item);<br> }<br> class display0 implements Calculation<br> {<br> int p;<br> public void calculate(int num)<br> {<br> p = num * num; <br> }<br> }<br> <br> class display1 implements Calculation<br> {<br> int p;<br> public void calculate(int num)<br> {<br> p = num / num; <br> }<br> }<br> <br> public class interfaces_Example <br> {<br> public static void main(String args[])<br> {<br> display0 object0 = new display0();<br> display1 object1 = new display1();<br> object0.p = 0;<br> object1.p = 0; <br> object0.calculate(5);<br> object1.calculate(5);<br> System.out.print(object0.p + " " + object1.p);<br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">interface calculation<br> {<br> void calculate(int Num);<br> }<br> class display implements calculation<br> {<br> int p;<br> public void calculate(int Num)<br> {<br> p = Num * Num; <br> }<br> }<br> <br> public class interfaces_Example<br> {<br> public static void main(String args[])<br> {<br> display object = new display();<br> object.p = 0; <br> object.calculate(4);<br> System.out.print(object.p);<br> }<br> }<br></pre>
What is the output of below snippet?<br><pre class="prettyprint lang-c">try (InputStream is = ...) <br>{<br> // do stuff with is...<br>} <br>catch (IOException e) <br>{<br> // handle exception<br>}<br></pre>
Does close() implicitly flush() the stream.
Can abstract keyword be used with constructor, Initialization Block, Instance Initialization and Static Initialization Block.
Which of the following is the correct way of implementing an interface salary by class company?
Which of the following is the correct way of implementing an interface N by class M?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply