Quiz
Week 2 Practice Quiz
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (16)
1A special variable that holds a value being passed into a method is called what?
- AModifier
- BParameter
- CAlias
- DArgument
2The scope of a public instance field is:
- Aonly the class in which it is defined
- Binside the class, but not inside any method
- Cinside the parentheses of a method header
- Dthe instance methods and methods outside the class
3A constructor is a method that:
- Areturns an object of the class.
- Bnever receives any arguments.
- Cwith the name ClassName.constructor.
- Dperforms initialization or setup operations.
4A constructor:
- Aalways accepts two arguments
- Bhas return type of void
- Chas the same name as the class
- Dalways has an access specifier of private
5When you pass an argument to a method, be sure that the argument's data type is compatible with:
- Athe parameter variable's data type
- Bthe method's return type
- Cthe version of Java currently being used
- DIEEE standards
6When an object, such as a String, is passed as an argument, it is:
- Aactually a reference to the object that is passed
- Bpassed by value like any other parameter value
- Cencrypted
- Dnecessary to know exactly how long the string is when writing the program
7Each repetition of a loop is known as what?
- AAn iteration
- BA cycle
- CAn execution
- DA Lap
8Java allows you to create objects of this class in the same way you would create primitive variables.
- ARandom
- BString
- CPrintWriter
- DScanner
9A subclass can directly access:
- Aall members of the superclass
- Bonly public and private members of the superclass
- Conly protected and private members of the superclass
- Donly public and protected members of the superclass
10Like a family tree, a ________ shows the inheritance relationship between classes.
- Aflowchart
- Bclass map
- Cclass hierarchy
- Dbinary tree
11 If the IOData.dat file does not exist, what will happen when the following statement is executed?

- AA FileNotFoundException will be thrown.
- BAn IOExcepton will be thrown.
- CThe file IOData.dat will be created.
- DThis is a critical error, the program will stop execution.
12To serialize an object and write it to the file, use this method of the ObjectOutputStream class.
- ASerializeObject
- BWriteObject
- CSerialize
- DSerializeAndWrite
13In GUI terminology, a container that can be displayed as a window is known as a:
- Amessage dialog
- Bbuffer
- CSwing package
- Dframe
14Programs that operate in a GUI environment must be:
- Aevent driven
- Bin color
- Cdialog boxes
- Dlayout managers
15The catch clause:
- Afollows the try clause
- Bstarts with the word catch followed by a parameter list in parentheses containing an ExceptionType parameter variable
- Ccontains code to gracefully handle the exception type listed in the parameter list
- DAll of these
16This is a section of code that gracefully responds to exceptions when they are thrown.
- AThrown class
- BDefault exception handler
- CException
- DException handler
Information
- Description
- CPSI 1413 Quiz on Week 2 Practice Quiz, created by Adam Peterson on 11/03/2019.
- Author
- Adam Peterson
- Language
- English
- Views
- 0
- Tags
- Rating
- No ratings yet Rate this quiz