Copro2 Midterm Exam

50 Questions | Attempts: 146
Please wait...
Question 1 / 51
🏆 Rank #-- ▾
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.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. For each try block, there can be one or more catch blocks, but at most only one finally block

Submit

3.
  1. The File's lastModified() method will return _________.

Submit

4. The File's canRead() method will return true if the file is __________.

Submit

5.
  1. The File's getName() method will return _________.

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. The File's exists() method will return true if the file is __________.

Submit

9. A throws clause lists the types of exceptions that a method might throw

Submit

10. This encompasses all exceptions which can ordinarily happen at runtime

Submit

11.
  1. What type of exception will you use if you are trying to access a secure web browser?

Submit

12. What type of exception will you use if your program attempt to divide a value to zero?

Submit

13.  It is a sequence of data flowing from a source to a destination.

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. When you perform an input operation in a java program, you use a ___________.

Submit

16. You can use Byte Streams in reading and writing character data

Submit

17. The file method canWrite returns a _________value.

Submit

18. It takes a single argument which must be an object that is a subclass of Throwable.

Submit

19. Which of the following statements is true?

Submit

20. A segment of code that can handle an exception that might be thrown by the try block that precedes it.

Submit

21. The ______ package contains all the classes you use in file processing.

Submit

22. It is a storage place where data can be kept before it is needed by a program that reads or writes that data.

Submit

23. What type of exception will you use if the user tries to save a file in a disk which is full?

Submit

24.
  1. The File's getParent() method will return _________.

Submit

25.
  1. The File's canWrite() method will return true if the file is __________.

Submit

26. The method ___________ is used for obtaining the current location of the file pointer

Submit

27. These are normal errors that can occur during the execution of a program

Submit

28. A block of code you attempt to execute while acknowledging that an exception might occur

Submit

29. The character streams are used to transfer _______ of characters.

Submit

30. This is a technique to manage errors comprises the group of methods

Submit

31. The method __________ moves the file pointer in the forward direction by the number of bytes that are specified

Submit

32. These are serious errors in the Java runtime system

Submit

33. What type of exception will you use if you are trying to access a non-existing character?

Submit

34. What type of exception will you use if you are trying to access a non-existing index?

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. The two modes of a file are readable and writable

Submit

39. Characters in Java are Unicode characters composed of two bits

Submit

40. It refers to declaration that you can handle exceptions of a particular class from a particular block of code.

Submit

41.
  1. The File's length() method will return _________.

Submit

42. The try-catch block can be nested

Submit

43.
  1. Which of the following statement is required for handling user input error?

Submit

44.
  1. What type of exception will you use if you are trying to access a non-existing file?

Submit

45. The following are the different constructors that can be used to create File object except?

Submit

46.
  1. The RandomAccessFile supports the concept of a _________ that is used to indicate the current location of the file.

Submit

47. FileNotFoundException is caused by general I/O failures, such as inability to read from a file

Submit

48.
  1. What type of exception will you use if you cannot read data from existing 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
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (50)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
The exception must be of the Throwable class or one of its subclasses
For each try block, there can be one or more catch blocks, but at most...
The File's lastModified() method will return _________.
The File's canRead() method will return true if the file is...
The File's getName() method will return _________.
What type of exception will you use if you are trying to access an...
Each catch block defines an exception handle
The File's exists() method will return true if the file is __________.
A throws clause lists the types of exceptions that a method might...
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...
 It is a sequence of data flowing from a source to a destination.
The java.io package contains a ___________ class that is used to read...
When you perform an input operation in a java program, you use a...
You can use Byte Streams in reading and writing character data
The file method canWrite returns a _________value.
It takes a single argument which must be an object that is a subclass...
Which of the following statements is true?
A segment of code that can handle an exception that might be thrown by...
The ______ package contains all the classes you use in file...
It is a storage place where data can be kept before it is needed by a...
What type of exception will you use if the user tries to save a file...
The File's getParent() method will return _________.
The File's canWrite() method will return true if the file is...
The method ___________ is used for obtaining the current location of...
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 character streams are used to transfer _______ of characters.
This is a technique to manage errors comprises the group of methods
The method __________ moves the file pointer in the forward direction...
These are serious errors in the Java runtime system
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...
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...
The two modes of a file are readable and writable
Characters in Java are Unicode characters composed of two bits
It refers to declaration that you can handle exceptions of a...
The File's length() method will return _________.
The try-catch block can be nested
Which of the following statement is required for handling user input...
What type of exception will you use if you are trying to access a...
The following are the different constructors that can be used to...
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 you cannot read data from...
What type of exception will you use if the user tries to enter a...
 The method _________ is used for moving the file pointer to...
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!