Quizzes
Search
Take Quizzes
Animal
Nutrition
Love
Relationship
Computer
Sports
Society
Business
Geography
Language
Personality
Harry Potter
Movie
Television
Music
Online Exam
Health
Country
Art
Entertainment
Celebrity
Math
Game
Book
Fun
Science
Food
History
Education
All Topics
Create a Quiz
Quiz Maker
Training Maker
Survey Maker
Flashcards
Brain Games
See All
ProProfs.com
Search
Create A Quiz
Take Quizzes
Animal
Nutrition
Love
Relationship
Computer
Sports
Society
Business
Geography
Language
Personality
Harry Potter
Movie
Television
Music
Online Exam
Health
Country
Art
Entertainment
Celebrity
Math
Game
Book
Fun
Science
Food
History
Education
All Topics
Products
Quiz Maker
Training Maker
Survey Maker
Flashcards
Brain Games
See All
ProProfs.com
Quizzes
Quizzes
›
Computer
›
Internet
Copro2 Midterm Exam
50 Questions
|
By Jhaicee | Updated: Jan 22, 2013
| Attempts: 146
Share
Start
Share on Facebook
Share on Twitter
Share on Whatsapp
Share on Pinterest
Share on Email
Copy to Clipboard
Embed on your website
Question
1
/ 50
0 %
0/100
Score
0/100
1.
The exception must be of the Throwable class or one of its subclasses
True
False
Submit
Start Quiz
About This Quiz
Choose the best answer.
2.
What's your name?
We’ll put your name on your report, certificate, and leaderboard.
2.
The File's getName() method will return _________.
A. the name of the file
B. the name of the object
C. the name of the class
D. void
Submit
3.
The File's canRead() method will return true if the file is __________.
A. existing
B. accessible
C. writable
D. readable
Submit
4.
The File's lastModified() method will return _________.
A. the file it was first opened
B. the file it was last modified
Cc. the file it was recently opened
D. the file it was last accessed
Submit
5.
For each try block, there can be one or more catch blocks, but at most only one finally block
True
False
Submit
6.
What type of exception will you use if you are trying to access an object which is null?
A. NullPointerException
B. StringIndexOutOfBoundsException
C. ArrayIndexOutOfBoundsException
D. IOException
Submit
7.
Each catch block defines an exception handle
True
False
Submit
8.
This encompasses all exceptions which can ordinarily happen at runtime
A. error
B. exception
C. Runtime Exception
D. User Exception
Submit
9.
What type of exception will you use if you are trying to access a secure web browser?
A. SecurityException
B. FileNotFoundException
C. OnAccessException
D. IOException
Submit
10.
What type of exception will you use if your program attempt to divide a value to zero?
A. NullPointerExcption
B. ArithmeticException
C. ArrayIndexOutOfBounds
D. IOExcption
Submit
11.
The File's exists() method will return true if the file is __________.
A. existing
B. accessible
C. writable
D. readable
Submit
12.
It is a sequence of data flowing from a source to a destination.
A. data flow
B. stream
C. input
D. output
Submit
13.
A throws clause lists the types of exceptions that a method might throw
True
False
Submit
14.
The java.io package contains a ___________ class that is used to read from and write data to anywhere in a file.
A. RandAccessFile
B. RandomAccessFile
C. AccessFile
D. ReadWriteFile
Submit
15.
It takes a single argument which must be an object that is a subclass of Throwable.
A. error
B. exception
C. Runtime Exception
D. User Exception
Submit
16.
The file method canWrite returns a _________value.
A. integer
B. Boolean
C. Object
D. void
Submit
17.
When you perform an input operation in a java program, you use a ___________.
A. pipeline
B. channel
C. moderator
D. stream
Submit
18.
You can use Byte Streams in reading and writing character data
True
False
Submit
19.
A segment of code that can handle an exception that might be thrown by the try block that precedes it.
A. finally block
B. try block
C. catch block
D. final block
Submit
20.
Which of the following statements is true?
A. Errors are more serious than Exceptions
B. Exceptions are more serious than Errors
C. Errors and Exceptions are equally serious
D. Exceptions and errors are same thing
Submit
21.
The ______ package contains all the classes you use in file processing.
A. java.file
B. java.io
C. java.lang
D. java.process
Submit
22.
What type of exception will you use if the user tries to save a file in a disk which is full?
A. DiskFullException
B. NullPointerException
C. OutOfStackException
D. OutOfMemoryException
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.
A. reader
B. writer
C. buffer
D. stream
Submit
24.
The File's getParent() method will return _________.
A. the name of the folder which the file can be found
B. the name of the file which currently executing
C. the name of the folder in My Documents.
D. the default folder
Submit
25.
These are normal errors that can occur during the execution of a program
A. error
B. exception
C. Runtime Exception
C. User Exception
Submit
26.
A block of code you attempt to execute while acknowledging that an exception might occur
A. finally block
B. try block
C. catch block
D. final block
Submit
27.
The File's canWrite() method will return true if the file is __________.
A. rewritable
B. accessible
C. writable
D. readable
Submit
28.
The method ___________ is used for obtaining the current location of the file pointer
A. getFilePonter()
B. seek()
C. skipBytes()
D. search()
Submit
29.
The character streams are used to transfer _______ of characters.
A. 8 bits
B. 8 bytes
C. 16 bits
D. 32 bytes
Submit
30.
These are serious errors in the Java runtime system
A. error
B. exception
C. Runtime Exception
D. User Exception
Submit
31.
This is a technique to manage errors comprises the group of methods
A. exception
B. error
C. error handling
D. exception handling
Submit
32.
What type of exception will you use if you are trying to access a non-existing index?
A. NullPointerException
B. StringIndexOutOfBoundsException
C. ArrayIndexOutOfBoundsException
D. IOException
Submit
33.
What type of exception will you use if you are trying to access a non-existing character?
A. NullPointerException
B. StringIndexOutOfBoundsException
C. ArrayIndexOutOfBoundsException
D. IOException
Submit
34.
The method __________ moves the file pointer in the forward direction by the number of bytes that are specified
A. getFilePonter()
B. seek()
C. skipBytes()
D. search()
Submit
35.
It comprises of data flowing into a program
A. buffered reader
B. buffered writer
C. input stream
D. output stream
Submit
36.
It refers to letting the method's caller catch the exception
A. passing on exceptions
B. catching exceptions
C. declaring exceptions
D. handling exceptions
Submit
37.
A block of code when you have actions you must perform at the end of a try…catch blocks
A. finally block
B. try block
C. catch block
D. final block
Submit
38.
It refers to declaration that you can handle exceptions of a particular class from a particular block of code.
A. passing on exceptions
B. catching exceptions
C. declaring exceptions
D. handling exceptions
Submit
39.
The File's length() method will return _________.
A. the file’s size
B. the file’s length
C. the file’s capacity
D. void
Submit
40.
The two modes of a file are readable and writable
True
False
Submit
41.
Characters in Java are Unicode characters composed of two bits
True
False
Submit
42.
What type of exception will you use if you are trying to access a non-existing file?
A. DiskFullException
B. FileNotFoundException
C. FileNotExistException
D. OutOfMemoryException
Submit
43.
Which of the following statement is required for handling user input error?
A. UserInputException
B. StringInputException
C. IOException
C. ArithmeticException
Submit
44.
The try-catch block can be nested
True
False
Submit
45.
The following are the different constructors that can be used to create File object except?
A. File(String directoryPath)
B. File(String directoryPath, String filename)
C. File(File dirPath, String filename)
D. File(File dirObj, String filename)
Submit
46.
What type of exception will you use if you cannot read data from existing file?
A. ReaderException
B. FileNotFoundException
C. AccessException
D. IOException
Submit
47.
The RandomAccessFile supports the concept of a _________ that is used to indicate the current location of the file.
A. file cursor
B. file pointer
C. file manager
D. file location
Submit
48.
FileNotFoundException is caused by general I/O failures, such as inability to read from a file
True
False
Submit
49.
What type of exception will you use if the user tries to enter a number instead of a character?
A. NullPointerExcption
B. ArithmeticException
C. ArrayIndexOutOfBounds
D. IOException
Submit
50.
The method _________ is used for moving the file pointer to specific positions
A. getFilePonter()
B. seek()
C. skipBytes()
D. search()
Submit
View My Results
Related Quizzes
Unit 3 Test On Internet Basics
Unit 3 Test On Internet Basics
Computer & Network Help Desk
Computer & Network Help Desk
Tablet Quiz: What Tablet Should I Buy Quiz
Tablet Quiz: What Tablet Should I Buy Quiz
Thank you for your feedback!
Would you like to edit this question to improve it?
No thanks
Name:
Email:
Oops! Give us more information:
Incorrect Question
Incorrect Answer
Typos
I have a feedback
Submit
Please provide name and email to proceed.
Please provide correct email to proceed.
Please provide feedback.
Please select the option.
All (50)
Unanswered (
)
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...
X
OK
X
OK
Cancel
X
OK
Cancel
Back to top
Back to top
Advertisement