A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
A A
Chapter 31: Web Services
Sample Chapter Questions
Q1) A ________ enables the client to manipulate the request information that will be
sent to the server when invoking a web service method.
A)WebServiceProvider.
B)Provider.
C)Binder.
D)BindingProvider.
Q2) For an object to be serialized and unserialized,what must be true about the class
definitions on the server and client?
A)They must have identical definitions,with the same class name and package.
B)The class names and definitions must match,but the packages may differ.
C)The class definitions must match,but the class name and package may differ.
D)The classes must have the same set of public properties,but the classes may have
additional methods that differ and class name and package do not matter.
Click Here! Download Testbank Now
Page 2
Chapter 2: Introduction to Java Applications
Sample Chapter Questions
Q1) Which of the following statements will print a single line containing "hello there"?
A)[Link]( "hello" ); [Link]( " there" );
B)[Link]( "hello" ," there" );
C)[Link]( "hello" ); [Link]( " there" );
D)[Link]( "hello" ); [Link]( " there" );
Q2) The format specifier ________ is a placeholder for an int value?
A)%a
B)%d
C)%int
D)%s
Q3) Which is the output of the following statements? [Link]( "Hello ");
[Link]( "World" );
A)Hello World
B)HelloWorld
C)Hello World.
D)World Hello
Click Here! Download Testbank Now
Page 3
Chapter 15: Graphics and Java 2d
Sample Chapter Questions
Q1) GeneralPath method lineTo
A)draws a line from the previous point in the GeneralPath object to the current point.
B)draws a line with an arrow head to point to a GeneralPath object.
C)moves the drawing origin around a line.
D)specifies the first point in a GeneralPath object.
Q2) The Graphics2D method(s)that determine(s)the color and texture for the shape to
display is/are:
A)setStroke
B)setPaint
C)setTexture and setColor
D)setTexturePaint
Q3) A general path is:
A)a set of polylines that do not result in a closed shape.
B)a shape constructed from straight lines and complex curves.
C)the shape of the curve in a font's characters.
D)represented by an object of class GraphicsPath.
Click Here! Download Testbank Now
Page 4
Chapter 14: Gui Components: Part 1
Sample Chapter Questions
Q1) The BorderLayout layout manager:
A)divides an area into five regions: NORTH,SOUTH,EAST,WEST and CENTER.
B)divides an area into five regions: UP,DOWN,LEFT,RIGHT and MIDDLE.
C)orders components vertically.
D)order components horizontally.
Q2) Forgetting to register an event-handler object for a particular GUI component's
event type causes .
A)events of that type to be ignored.
B)all of the GUI component's events to be ignored.
C)a compilation error.
D)None of the above.
Q3) Which of the following statements about a JLabel is false?
A)Applications rarely change a label's contents after creating it.
B)A JLabel can display text and an image.
C)A JLabel can display text and a button.
D)A JLabel is a subclass of JComponent.
Click Here! Download Testbank Now
Page 5
Chapter 22: Custom Generic Data Structures
Sample Chapter Questions
Q1) Which statement is false?
A)The shape of a binary search tree that corresponds to a set of data can
vary,depending on the order in which the values are inserted into the tree.
B)A node can be inserted at any point in a binary search tree.
C)The process of creating a binary search tree actually sorts the data,and thus this
process is called the binary tree sort.
D)The binary search tree facilitates duplicate elimination.
Q2) The technique of implementing each stack method as a call to a List method is
called __________.
A)delegation.
B)delimiting.
C)assigning.
D)shifting responsibility.
Click Here! Download Testbank Now
Page 6
Chapter 21: Generic Classes and Methods
Sample Chapter Questions
Q1) Suppose Stack is a generic class that has one type [Link] following
assignment Stack< Integer > integerStack = new Stack( 10 );
Is __________.
A)illegal.
B)permitted and safe.
C)permitted but unsafe,the compiler issues a warning message.
D)permitted but unsafe,the runtime environment issues a warning message.
Q2) __________ enable programmers to specify,with a single method declaration,a
set of related methods.
A)Overloaded methods.
B)Overriden methods.
C)Generic methods.
D)Generics.
Click Here! Download Testbank Now
Page 7
Chapter 10: Object-Oriented Programming: Polymorphism
Sample Chapter Questions
Q1) If the superclass contains only abstract method declarations,the superclass is used
for:
A)implementation inheritance.
B)interface inheritance.
C)Both.
D)Neither.
Q2) Polymorphism allows for specifics to be dealt with during:
A)execution.
B)compilation.
C)programming.
D)debugging.
Q3) Which of the following is not possible?
A)A class that implements two interfaces.
B)A class that inherits from two classes.
C)A class that inherits from one class,and implements an interface.
D)All of the above are possible.
Click Here! Download Testbank Now
Page 8
Chapter 17: Files,streams and Object Serialization
Sample Chapter Questions
Q1) Which of the following is not an application of a File object?
A)Open or edit a file.
B)Determine if a file exists.
C)Determine whether a file is readable.
D)Determine whether a file is writable.
Q2) Which JFileChooser method returns the file the user selected.
A)getSelectedFile.
B)getFile.
C)getOpenDialog.
D)showOpenDialog.
Q3) What interface must a class implement to indicate that objects of the class can be
output and input as a stream of bytes?
A)Synchronize.
B)Deserializable.
C)Serializable.
D)IOOutput.
Click Here! Download Testbank Now
Page 9
Chapter 18: Recursion
Sample Chapter Questions
Q1) The number of calls to recursively calculate the Fibonacci value of 7 is:
A)7
B)13
C)41
D)39
Q2) When the recursion step executes:
A)this is known as indirect recursion.
B)all of the computer's processes halt until the recursion step has completed executing.
C)the original call to the method is still active.
D)All of the above.
Q3) Fractals that yield an exact copy of the original when a portion of the original image
is magnified are called .
A)strictly self similar fractals.
B)Koch Curve fractals.
C)similar fractals.
D)mirror fractals.
Click Here! Download Testbank Now
Page 10
Chapter 30: Ajax-Enabled Jsf Web Applications
Sample Chapter Questions
Q1) The ________ element displays a collection's data in tabular format.
A)h:table.
B)h:collection.
C)h:dataTable.
D)None of the above.
Q2) The f:ajax element's ________ attribute specifies a space-separated list of
element ids-the values of these elements are submitted as part of the Ajax request.
A)execute.
B)render.
C)send.
D)display.
Q3) The ________ annotation allows you to inject a DataSource into a managed bean.
A)@Resource.
B)@DataSource.
C)@Database.
D)None of the above.
Click Here! Download Testbank Now
Page 11
Chapter 29: Java Server Faces Web Applications
Sample Chapter Questions
Q1) Which of the following is true?
A)An app's images and CSS files can be placed in any folder of the app.
B)An app's images and CSS files are placed in the app's resources folder within the Web
Pages node.
C)An app's images and CSS files are placed in the subfolders of the app's resources
folder within the Web Pages node.
D)None of the above.
Q2) A ________ determines whether a field contains an integer value in an acceptable
range.
A)f:validateDoubleRange.
B)f:validateLength.
C)f:validateLongRange.
D)None of the above.
Click Here! Download Testbank Now
Page 12
Chapter 19: Searching, Sorting and Big O
Sample Chapter Questions
Q1) Which of the following is not a name for a big O run time?
A)Constant run time.
B)Variable run time.
C)Linear run time.
D)Quadratic run time.
Q2) What does each iteration of the insertion sort algorithm do?
A)Each iteration takes the next smallest element and inserts it at the beginning of the
array.
B)Each iteration takes the next element in the unsorted portion of the array and inserts it
into the sorted portion.
C)Sorted subarrays are inserted into the larger array.
D)Each iteration determines the location of a pivot and inserts it into place.
Q3) Which of the following sorting algorithms is the fastest?
A)Selection sort.
B)Insertion sort.
C)Merge sort.
D)They all run at roughly the same speed.
Click Here! Download
Page 13 Testbank Now
Chapter 7: Arrays and Arraylists
Sample Chapter Questions
Q1) Which statement below initializes array items to contain 3 rows and 2 columns?
A)int[][] items = { { 2,4 },{ 6,8 },{ 10,12 } };.
B)int[][] items = { { 2,6,10 },{ 4,8,12 } };.
C)int[][] items = { 2,4 },{ 6,8 },{ 10,12 };.
D)int[][] items = { 2,6,10 },{ 4,8,12 };.
Q2) What kind of application tests a class by creating an object of that class and calling
the class's methods?
A)Pseudo application.
B)Debugger.
C)Tester.
D)Test harness.
Q3) Which of the following will not produce a compiler error?
A)Changing the value of a constant after it is declared.
B)Changing the value at a given index of an array after it is created.
C)Using a final variable before it is initialized.
D)All of the above will produce compiler errors.
Click Here! Download Testbank Now
Page 14
Chapter 24: Multimedia: Applets and Applications
Sample Chapter Questions
Q1) Which of the following statements is false?
A)The "sizzle" of Java is multimedia.
B)Most programming languages do not have built-in multimedia capabilities.
C)True three-dimensional multimedia imaging is widely available today.
D)Most new computers are sold "multimedia ready" today.
Q2) Which statement about class AudioClip is false?
A)Method play plays the audio once.
B)Method loop continuously loops the audio clip in the background.
C)Method stop terminates an audio clip that is playing.
D)Method makeAudioClip returns a reference to an AudioClip.
Q3) Which method returns the location of the applet's .class file?
A)getDocumentBase.
B)getCodeBase.
C)getClassLocation.
D)getLocation.
Click Here! Download Testbank Now
Page 15
Chapter 6: Methods: a Deeper Look
Sample Chapter Questions
Q1) Which statement creates a random value from the sequence 2,5,8,11 and [Link]
randomNumbers is a Random object.
A)2 + 5 * [Link]( 3 );
B)3 + 2 * [Link]( 5 );
C)5 + 3 * [Link]( 2 );
D)2 + 3 * [Link]( 5 );
Q2) Variables should be declared as fields only if
A)they are local variables.
B)they are used only within a method.
C)they are required for use in more than one method or their values must be saved
between calls to the class's methods.
D)they are arguments.
Q3) Which of the following methods is not in the Math class?
A)ceil.
B)abs.
C)parseInt.
D)log.
Click Here! Download
Page 16 Testbank Now
Chapter 5: Control Statements: Part 2
Sample Chapter Questions
Q1) Which of the following will count down from 10 to 1 correctly?
A)for ( int j = 10;j <= 1;j++ )
B)for ( int j = 1;j <= 10;j++ )
C)for ( int j = 10;j > 1;j-- )
D)for ( int j = 10;j >= 1;j-- )
Q2) Which of the following statements about a do…while repetition statement is true?
A)The body of a do…while loop is executed only if the terminating condition is true.
B)The body of a do…while loop is executed only once.
C)The body of a do…while loop is always executed at least once.
D)None of the above
Q3) To exit out of a loop completely,and resume the flow of control at the next line in the
method,use _______.
A)A continue statement.
B)A break statement.
C)A return statement.
D)Any of the above.
Click Here! Download Testbank Now
Page 17
Chapter 11: Exception Handling
Sample Chapter Questions
Q1) Which of the following exceptions is a checked exception?
A)ArithmeticException.
B)IOException.
C)RuntimeException.
D)InputMismatchException.
Q2) Which of the following statements is false?
A)All exceptions must derive from the class Throwable.
B)The class Throwable provides the method getStackTrace that outputs the stack trace
to the standard error stream.
C)The class Throwable provides the method getMessage that returns the descriptive
string stored in an exception.
D)The string returned from class Throwable's getMessage method contains the name of
the exception's class.
Click Here! Download Testbank Now
Page 18
Chapter 27: Networking
Sample Chapter Questions
Q1) To be able to send and receive messages in parallel over a network connection,a
program must use __________ of execution.
A)one thread.
B)two threads.
C)three threads.
D)four threads.
Q2) Which statement is false?
A)Streams-based transmission is connection-oriented.
B)Connection-oriented transmission is like the telephone system.
C)Datagram-based transmission is connection oriented.
D)Connectionless transmission is like the way the mail is carried by the postal service.
Q3) A JEditorPane generates HyperlinkEvents only if it is __________.
A)invisible.
B)visible.
C)uneditable.
D)editable.
Click Here! Download Testbank Now
Page 19
Chapter 28: Accessing Databases With Jdbc
Sample Chapter Questions
Q1) What is the name of a key in one table that is required to matche a primary key in
another table?
A)Foreign key.
B)Matching key.
C)Joined key.
D)Linking key.
Q2) Which constants are used to indicate that a ResultSet is scrollable,insensitive to
changes and read only?
A)TYPE_SCROLLABLE_INSENSITIVE,CONCUR_READ_ONLY.
B)TYPE_SCROLLABLEINSENSITIVE,CONCUR_READONLY.
C)TYPE_SCROLL_INSENSITIVE,CONCUR_READ_ONLY.
D)TYPE_SCROLL_INSENSITIVE,CONCUR_READONLY.
Q3) Pattern matching in a SQL query is performed with which clause?
A)FROM.
B)WHERE.
C)SELECT.
D)LIKE.
Click Here! Download
Page 20Testbank Now
Chapter 1: Introduction to Computers and Java
Sample Chapter Questions
Q1) Which language was developed by Microsoft in the early 1990s to simplify the
development of Windows applications?
A)Visual C#.
B)Python.
C)Objective-C.
D)Visual Basic.
Q2) Which of the following statements is false?
A)The concepts of icons,menus and windows were originally developed by Xerox PARC.
B)Windows is an open source operating system.
C)The software that contains the core components of the operating system is called the
kernel.
D)Linux source code is available to the public for examination and modification.
Click Here! Download Testbank Now
Page 21
Chapter 3: Introduction to Classes and Objects
Sample Chapter Questions
Q1) How many significant digits does a double variable have?
A)7.
B)8.
C)14.
D)15.
Q2) Which of the following is a Scanner method?
A)nextLine.
B)nextText.
C)nextWord.
D)readNext.
Q3) What is the name of the values the method call passes to the method for the
parameters?
A)Arguments.
B)References.
C)Objects.
D)Values.
Click Here! Download Testbank Now
Page 22
Chapter 16: Strings
Sample Chapter Questions
Q1) Consider the Java segment: String line1 = new String( "c = 1 + 2 + 3" );
StringTokenizer tok = new StringTokenizer( line1,"+=" );
String foo = [Link]();
String bar = [Link]();
The values of foo and bar are:
A)foo is "c ",bar is " = ".
B)foo is "c",bar is " ".
C)foo is " = ",bar is " + ".
D)foo is "c ",bar is " 1 ".
Q2) Consider the String below: String r = "a toyota";
Which of the following will create the String r1 = "a TOYOTa"?
A)String r1 = [Link]( "toyot",TOYOT" );
B)String r1 = [Link]( 't','T' ); r1 = [Link]( 'o','0' );
R1 = [Link]( 'y','Y' );
C)String r1 = [Link]( 't','T' ).replace( 'o','0' ).replace( 'y','Y' );
D)String r1 = [Link]( 2,4 ).toUpperCase();
Click Here! Download Testbank Now
Page 23
Chapter 9: Object Oriented Programming: Inheritance
Sample Chapter Questions
Q1) To avoid duplicating code,use ________,rather than ________.
A)inheritance,the "copy-and-past" approach.
B)the "copy-and-past" approach,inheritance.
C)a class that explicitly extends Object,a class that does not extend Object.
D)a class that does not extend Object,a class that explicitly extends Object.
Q2) Private fields of a superclass can be accessed in a subclass
A)by calling private methods declared in the superclass.
B)by calling public or protected methods declared in the superclass.
C)directly.
D)All of the above.
Q3) Overriding a method differs from overloading a method because:
A)Overloaded methods have the same signature.
B)Overridden methods have the same signature.
C)Both of the above.
D)Neither of the above.
Click Here! Download Testbank Now
Page 24
Chapter 12: Atm Case Study,part 1: Object-Oriented Design
With the Uml
Sample Chapter Questions
Q1) The use case diagram models ________.
A)the interactions between a system's client and one of the system's capabilities.
B)each software life cycle stage in succession.
C)each software life cycle by repeating one or more stages several times via use cases.
D)the interactions between implementations and testing.
Q2) An activation indicates that:
A)an object is sending a message.
B)an object is being created.
C)an object is executing.
D)an object has completed executing.
Q3) Which diagram is also called a collaboration diagram.
A)State machine diagram.
B)Communication diagram.
C)Activity diagram.
D)Sequence diagram.
Page 25Testbank Now
Click Here! Download