Java programming assignment,
MC001,8,A class that has at least one abstract method is called a:,concrete class,encapsulated class,abstract class,private class,c MC002,8,A class with no abstract methods is called a:,concrete class,encapsulated class,abstract class,private class,a MC003,9,Try blocks contain code that could possibly:,handle an exception,throw an exception,catch an exception,display an exception,b MC004,9,All exceptions are descendants of the class:,Throwable,Catchable,Tryable,Blockable,a MC005,10,When you open a text file in Java you should account for a possible:,FileNotFoundException,FileFullException,FileNotReadyException,All of the other options,a MC006,10,The stream that is automatically available to your Java code is:,System.out,System.in,System.err,All of the other options,d MC007,11,A recursive method is one that:,Returns a value,Initializes a set of variables,Returns no value,Invokes itself,d MC008,11,A recursive solution can be preferable to an iterative solution because:,recursive method calls are faster than iterative looping,recursive solutions may be easier to understand than iterative ones,recursion uses less memory than iteration,iteration should be avoided.,b MC009,13,A Java interface is an example of:,encapsulation,abstraction,polymorphism,All of the other options,b MC010,13,A class that uses an interface must use the keyword:,Extends,Inherits,Super,Implements,d MC011,14,The ArrayList class in Java comes from the package:,java.awt,java.io,java.util,java.container,c MC012,14,Placing an element in an ArrayList for the first time uses the method:,put(),set(),add(),place(),c MC013,15,Having the head instance variable of a linked list set to null means the list is:,full,empty,lost,None of the other options,b MC014,15,A common exception that occurs when using linked lists is the:,NodeOutOfBoundsException,NodeEmptyException,NullPointerException,NullNodeOccurredException,c MC015,16,The primary interface/interfaces for a collection class is/are:,Collection
,Set,List,All of the other options,d MC016,16,The method contains(Object o) of the ArrayList class returns a value of type:,int,char,byte,boolean,d TF001,8,Java allows an instance of an abstract class to be instantiated.,FALSE TF002,8,Downcasting should be used only in situations where it makes sense.,TRUE TF003,9,The throw operator causes a change in the flow of control.,TRUE TF004,9,When an exception is thrown the code in the surrounding try block continues executing and then the catch block begins execution.,FALSE TF005,10,A stream is an object that allows for the flow of data between your program and some I/O device or some file.,TRUE TF006,10,A full path name gives a complete path name starting from the directory the program is in.,FALSE TF007,11,When a recursive call is encountered computation is temporarily suspended; all of the information needed to continue the computation is saved and the recursive call is evaluated.,TRUE TF008,11,The binary search algorithm is extremely slow compared to an algorithm that simply tries all array elements in order.,FALSE TF009,13,A class may only implement one interface.,FALSE TF010,13,An interface is a type.,TRUE TF011,14,An ArrayList object has a fixed size.,FALSE TF012,14,ArrayList objects do not have the array square-bracket notation.,TRUE TF013,15,A linked data structure contains nodes and links.,TRUE TF014,15,When using a linked list you do not need to know when the end of the list has been reached.,FALSE TF015,16,A Java collection is any class that implements the Collection interface.,TRUE TF016,16, is a wildcard used to specify a wide range of parameters.,FALSE