Question: JAVA: Which of the following statements are true? A handler object fires an event. A source object fires an event. Any object such a String
JAVA:
Which of the following statements are true?
| A handler object fires an event. | ||
| A source object fires an event. | ||
| Any object such a String object can fire an event. | ||
| A handler is registered with the source object for processing the event. |
Invoking new File(String filename) may throw ________.
| FileNotFoundException | ||
| RuntimeException | ||
| Exception | ||
| Throwable |
The read method, the write method, and creating stream constructors can throw IOException errors.
| true | ||
| false |
What does the following code do? FileInputStream fis = new FileInputStream("test.dat");
| It creates a new file named test.dat if it does not exist and opens the file so you can write to it. | ||
| It creates a new file named test.dat if it does not exist and opens the file so you can write to it and read from it. | ||
| It creates a new file named test.dat regardless of whether it exists or not and opens the file so you can write to it. | ||
| It creates a new file named test.dat regardless of whether it exists or not and opens the file so you can write to it and read from it. | ||
| It creates a FileInputStream for test.dat if test.dat exists. |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
