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?interface NewCustomer {}class RegCustomer implements NewCustomer {}class QuickCustomer implements NewCustomer {}
What is the output of this program?interface Calculation { int var = 0; void calculate(int num); } class display implements Calculation { int p; public void calculate(int num) { if (num<2) { p = var; } else { p = num * num; } } } public class interfaces_Example { public static void main(String args[]) { display[] array = new display[4]; for(int k=0; k<4; k++) array[k] = new display(); array[0].calculate(0); array[1].calculate(2); array[2].calculate(4); System.out.print(array[0].p+" " + array[1].p + " " + array[2].p); } }
What is the output of this program?interface Calculation { void calculate(int item); } class display0 implements Calculation { int p; public void calculate(int num) { p = num * num; } } class display1 implements Calculation { int p; public void calculate(int num) { p = num / num; } } public class interfaces_Example { public static void main(String args[]) { display0 object0 = new display0(); display1 object1 = new display1(); object0.p = 0; object1.p = 0; object0.calculate(5); object1.calculate(5); System.out.print(object0.p + " " + object1.p); } }
What is the output of this program?interface calculation { void calculate(int Num); } class display implements calculation { int p; public void calculate(int Num) { p = Num * Num; } } public class interfaces_Example { public static void main(String args[]) { display object = new display(); object.p = 0; object.calculate(4); System.out.print(object.p); } }
What is the output of below snippet?try (InputStream is = ...) { // do stuff with is...} catch (IOException e) { // handle exception}
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
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies