GoConqr has a new look! Let us know what you think.

Quiz

Week 2 Practice Quiz

Adam Peterson 16 questions

Take the quiz

Questions in this quiz (16)

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

Information

Description
CPSI 1413 Quiz on Week 2 Practice Quiz, created by Adam Peterson on 11/03/2019.
Language
English
Views
0
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?