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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started