Copro2 Midterm Exam

50 Questions | Attempts: 146
Share
Please wait...
Question 1 / 50
0 %
0/100
Score 0/100
1. The exception must be of the Throwable class or one of its subclasses
Submit
Please wait...
About This Quiz
Web Quizzes & Trivia

Choose the best answer.

Tell us your name to personalize your report, certificate & get on the leaderboard!
2.
  1. The File's getName() method will return _________.
Submit
3. The File's canRead() method will return true if the file is __________.
Submit
4.
  1. The File's lastModified() method will return _________.
Submit
5. For each try block, there can be one or more catch blocks, but at most only one finally block
Submit
6.
  1. What type of exception will you use if you are trying to access an object which is null?
Submit
7. Each catch block defines an exception handle
Submit
8. This encompasses all exceptions which can ordinarily happen at runtime
Submit
9.
  1. What type of exception will you use if you are trying to access a secure web browser?
Submit
10. What type of exception will you use if your program attempt to divide a value to zero?
Submit
11. The File's exists() method will return true if the file is __________.
Submit
12.  It is a sequence of data flowing from a source to a destination.
Submit
13. A throws clause lists the types of exceptions that a method might throw
Submit
14. The java.io package contains a ___________ class that is used to read from and write data to anywhere in a file.
Submit
15. It takes a single argument which must be an object that is a subclass of Throwable.
Submit
16. The file method canWrite returns a _________value.
Submit
17. When you perform an input operation in a java program, you use a ___________.
Submit
18. You can use Byte Streams in reading and writing character data
Submit
19. A segment of code that can handle an exception that might be thrown by the try block that precedes it.
Submit
20. Which of the following statements is true?
Submit
21. The ______ package contains all the classes you use in file processing.
Submit
22. What type of exception will you use if the user tries to save a file in a disk which is full?
Submit
23. It is a storage place where data can be kept before it is needed by a program that reads or writes that data.
Submit
24.
  1. The File's getParent() method will return _________.
Submit
25. These are normal errors that can occur during the execution of a program
Submit
26. A block of code you attempt to execute while acknowledging that an exception might occur
Submit
27.
  1. The File's canWrite() method will return true if the file is __________.
Submit
28. The method ___________ is used for obtaining the current location of the file pointer
Submit
29. The character streams are used to transfer _______ of characters.
Submit
30. These are serious errors in the Java runtime system
Submit
31. This is a technique to manage errors comprises the group of methods
Submit
32. What type of exception will you use if you are trying to access a non-existing index?
Submit
33. What type of exception will you use if you are trying to access a non-existing character?
Submit
34. The method __________ moves the file pointer in the forward direction by the number of bytes that are specified
Submit
35.
  1. It comprises of data flowing into a program
Submit
36. It refers to letting the method's caller catch the exception
Submit
37. A block of code when you have actions you must perform at the end of a try…catch blocks
Submit
38. It refers to declaration that you can handle exceptions of a particular class from a particular block of code.
Submit
39.
  1. The File's length() method will return _________.
Submit
40. The two modes of a file are readable and writable
Submit
41. Characters in Java are Unicode characters composed of two bits
Submit
42.
  1. What type of exception will you use if you are trying to access a non-existing file?
Submit
43.
  1. Which of the following statement is required for handling user input error?
Submit
44. The try-catch block can be nested
Submit
45. The following are the different constructors that can be used to create File object except?
Submit
46.
  1. What type of exception will you use if you cannot read data from existing file?
Submit
47.
  1. The RandomAccessFile supports the concept of a _________ that is used to indicate the current location of the file.
Submit
48. FileNotFoundException is caused by general I/O failures, such as inability to read from a file
Submit
49. What type of exception will you use if the user tries to enter a number instead of a character?
Submit
50.  The method _________ is used for moving the file pointer to specific positions
Submit
View My Results

Quiz Review Timeline (Updated): Jan 22, 2013 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jan 22, 2013
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 07, 2011
    Quiz Created by
    Jhaicee
Cancel
  • All
    All (50)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
The exception must be of the Throwable class or one of its subclasses
The File's getName() method will return _________.
The File's canRead() method will return true if the file is...
The File's lastModified() method will return _________.
For each try block, there can be one or more catch blocks, but at most...
What type of exception will you use if you are trying to access an...
Each catch block defines an exception handle
This encompasses all exceptions which can ordinarily happen at runtime
What type of exception will you use if you are trying to access a...
What type of exception will you use if your program attempt to divide...
The File's exists() method will return true if the file is __________.
 It is a sequence of data flowing from a source to a destination.
A throws clause lists the types of exceptions that a method might...
The java.io package contains a ___________ class that is used to read...
It takes a single argument which must be an object that is a subclass...
The file method canWrite returns a _________value.
When you perform an input operation in a java program, you use a...
You can use Byte Streams in reading and writing character data
A segment of code that can handle an exception that might be thrown by...
Which of the following statements is true?
The ______ package contains all the classes you use in file...
What type of exception will you use if the user tries to save a file...
It is a storage place where data can be kept before it is needed by a...
The File's getParent() method will return _________.
These are normal errors that can occur during the execution of a...
A block of code you attempt to execute while acknowledging that an...
The File's canWrite() method will return true if the file is...
The method ___________ is used for obtaining the current location of...
The character streams are used to transfer _______ of characters.
These are serious errors in the Java runtime system
This is a technique to manage errors comprises the group of methods
What type of exception will you use if you are trying to access a...
What type of exception will you use if you are trying to access a...
The method __________ moves the file pointer in the forward direction...
It comprises of data flowing into a program
It refers to letting the method's caller catch the exception
A block of code when you have actions you must perform at the end of a...
It refers to declaration that you can handle exceptions of a...
The File's length() method will return _________.
The two modes of a file are readable and writable
Characters in Java are Unicode characters composed of two bits
What type of exception will you use if you are trying to access a...
Which of the following statement is required for handling user input...
The try-catch block can be nested
The following are the different constructors that can be used to...
What type of exception will you use if you cannot read data from...
The RandomAccessFile supports the concept of a _________ that is used...
FileNotFoundException is caused by general I/O failures, such as...
What type of exception will you use if the user tries to enter a...
 The method _________ is used for moving the file pointer to...
Alert!

Advertisement