1. (TCO 1) A listener interface becomes _____ with its event source at compile time. (Points : 3)
[removed] buffered [removed] defined [removed] instantiated [removed] registered |
2. (TCO 1) The drawString () method accepts all of the following arguments except a _____. (Points : 3)
[removed] Graphics object [removed] horizontal coordinate [removed] String [removed] vertical coordinate |
3. (TCO 1) The Java 2 Runtime Environment contains all the following tools except the _____. (Points : 3)
[removed] Java APIs and Class Libraries [removed] Java Applet Viewer [removed] Java Compiler [removed] Java Virtual Machine |
4. (TCO 1) An IDE is also called a _____. (Points : 3)
[removed] builder tool [removed] mini-browser [removed] scripting tool [removed] text editor |
5. (TCO 1) In object-oriented terminology, the characteristics of an object are defined by its _____. (Points : 3)
[removed] attributes [removed] class [removed] instance [removed] methods |
6. (TCO 1) Typing a(n) _____ after the package name in an import statement tells the program to load all the classes within a package. (Points : 3)
[removed] asterisk [removed] comma [removed] forward slash [removed] semicolon |
7. (TCO 3) Programmers use the _____ class to format decimal numbers into Strings for output. (Points : 3)
[removed] Float [removed] DecimalFormat [removed] DecimalFormatSymbols [removed] Format |
8. (TCO 3) A(n) _____ operator is used to connect two conditional expressions. (Points : 3)
[removed] arithmetic [removed] equality [removed] logical [removed] relational |
9. (TCO 1) _____ is a package that provides classes to support system input and output. (Points : 3)
[removed] java.lang [removed] java.io [removed] java.util [removed] javax.swing |
10. (TCO 1) Which of the following is an equality operator? (Points : 3)
[removed] != [removed] = [removed] >= [removed] += |
11. (TCO 1) Which of the following is not a method in the Math class? (Points : 3)
[removed] abs() [removed] exp() [removed] random() [removed] sqrt() [removed] All are valid methods of the Math class. |
12. (TCO 1) The _____ is used to store any truncated remainder value from integer division. (Points : 3)
[removed] cast [removed] integer division [removed] modulus [removed] precedence operator |
13. (TCO 4) The index of the array starts at _____ and can only be of type _____. (Points : 4)
[removed] 1, int [removed] 1, double [removed] 0, double [removed] 0, int |
14. (TCO 4) Which of the following statements about creating arrays and initializing their elements is false? (Points : 4)
[removed] The new keyword should be used to create an array. [removed] When an array is created, the number of elements must be placed in square brackets following the type of element being stored. [removed] The elements of an array of integers have a value of null before they are initialized. [removed] A for loop is an excellent way to set the values of the elements of an array. |
15. (TCO 4) The index number assigned to elements of an array is also called a _____. (Points : 4)
[removed] counter [removed] member [removed] register [removed] subscript |
16. (TCO 4) How many lines of output will the following loop produce? for (inti=1; i<=4; i++) { for (int j=1; j<=3; j++) System.out.println(i + “ - “ + j); } (Points : 4)
[removed] 4 [removed] 3 [removed] 7 [removed] 12 |
1. (TCO 6) All of the following are AWT components except _____. (Points : 4)
[removed] Choice [removed] JOptionPane [removed] Panel [removed] TextArea |
2. (TCO 6) A(n) _____ is the term used to specify a class that instantiates other classes and calls appropriate methods. (Points : 4)
[removed] driver class [removed] external class [removed] instance class [removed] superclass |
3. (TCO 6) The _____ of an object refers to the various properties of the object, whose values might change. (Points : 4)
[removed] behavior [removed] identity [removed] instance [removed] state |
4. (TCO 6) The immediate superclass of a TextArea component is _____. (Points : 4)
[removed] TextContainer [removed] Text [removed] TextComponent [removed] TextField |
5. (TCO 2) The _____ of an object refers to the various properties of the object, whose values might change. (Points : 4) [removed] behavior [removed] identity [removed] instance [removed] state |
6. (TCO 2) The first parameter in the for statement is a(n) _____. (Points : 4)
[removed] assignment statement [removed] conditional statement [removed] decrement operator [removed] increment operator |
7. (TCO 2) Which of the following statements creates a two-dimensional array with 4 rows and 3 columns? (Points : 4)
[removed] int[][] myTable = new int[4][3]; [removed] intmyTable[] = new int[3][4]; [removed] int[][] myTable = new int[3][4]; [removed] int[] myTable = new int[4][3]; |
8. (TCO 2) A loop that executes a specific number of times is called a _____ loop. (Points : 4)
[removed] counter-controlled [removed] bottom test [removed] top test [removed] sentinel-controlled |
9. (TCO 5) A(n) _____ database maintains data in tables, allowing relationships between the tables to be specified, normally controlled by a DBMS. (Points : 4)
[removed] relational [removed] object-oriented [removed] static [removed] None of the above |
10. (TCO 5) In a database, you use _____ to store data. (Points : 4)
[removed] arrays [removed] structures [removed] classes [removed] tables |
11. (TCO 5) The following are types of SQL statements, except (Points : 4)
[removed] drop. [removed] create. [removed] build. [removed] select. |
12. (TCO 5) What do you have to do when you need to return a set of data results from a table based on a set of parameters? (Points : 4)
[removed] Run a query [removed] Run an update query [removed] Run the program [removed] Set up a result set |
13. (TCO 5) Manipulating data in a database efficiently and establish relationships between tables, it is necessary to establish a(n) _____ per table. (Points : 4)
[removed] sequence [removed] association [removed] relation [removed] index |
14. (TCO 5) A table constraint _____. (Points : 4)
[removed] restricts the field value with respect to all other values in the table [removed] is used to specify the allowable value of data in a column, such as a data range [removed] limits the value placed in a specific column [removed] identifies the primary or foreign key |
15. (TCO 5) _____ is an association between fields. (Points : 4)
[removed] Cardinality [removed] Normalization [removed] Association [removed] Relationship |
16. (TCO 6) The createContentPane() method accepts no arguments, but it returns a _____ object. (Points : 4)
[removed] ContentPane [removed] Panel [removed] Frame [removed] Container |
17. (TCO 6) When a mnemonic key is assigned to a letter in the command’s keyword, pressing _____ will trigger the menu command. (Points : 4)
[removed] ALT+the letter [removed] the letter [removed] CTRL+the letter [removed] SHIFT+the letter |
18. (TCO 6) The setBold() and setFontSize() methods belong to the _____ class. (Points : 4)
[removed] Attribute [removed] AttributeSet [removed] Style [removed] StyleConstants |
19. (TCO 6) Which sort method repeatedly searches an array for its lowest-value (unsorted) element? (Points : 4)
[removed] Bubblesort [removed] Insertion sort [removed] Merge sort [removed] Selection sort |
20. (TCO 7) The _____ network system contains application logic that typically is tied to the client. (Points : 4)
[removed] two-tier [removed] three-tier [removed] four-tier [removed] multi-tier |
21. (TCO 7) What does the first argument to the FlowLayoutconstructor specify? (Points : 4)
[removed] Vertical placement [removed] Horizontal placement [removed] Alignment [removed] Background color |
22. (TCO 7) _____ files are archive files that are created with a Java archive tool. (Points : 4)
[removed] CPIO [removed] JAR [removed] TAR [removed] ZIP |
23. (TCO 7) Which of the following statements will construct a stream to write data to a file? Assume that “output” has been declared previously as a DataOutputStream object. (Points : 4)
[removed] output = new DataOutputStream(Filename); [removed] output = new DataOutputStream(); [removed] output = new DataOutputStream(new FileOutputStream(Filename)); [removed] output = DataOutputStream(FileOutputStream(Filename)); |
24. (TCO 6) Why when building an object is it important to make it as flexible as possible? (Points : 4)
[removed] Because it is important for other objects [removed] Because other, future applications may use it [removed] Because methods need to be public [removed] Because classes need to use it |
25. (TCO 6) The _____ class is not a descendant of the Collection class. (Points : 4)
[removed] ArrayList [removed] LinkedList [removed] HashMap [removed] SortedSet |
26. (TCO 6) Which of the following is true of an object s public interface? (Points : 4)
[removed] Changing an object s public interface will not affect existing programs. [removed] The implementation of a public method can be changed without changing the public interface. [removed] The public interface of an object consists of the method header and body. [removed] Object methods should be placed in an object s public interface, if possible. |
27. (TCO 6) The add() method of the ArrayList class has a(n) _____ return type. (Points : 4)
[removed] boolean [removed] int [removed] Object [removed] void |
28. (TCO 6) The access qualifier, _____, is used to indicate variables or methods associated with the class rather than an instance. (Points : 4)
[removed] final [removed] private [removed] public [removed] static |
29. (TCO 6) Which of the following is not typically a characteristic of a password? (Points : 4)
[removed] Requires a combination of characters and numbers [removed] Has an expiration time [removed] Is encrypted [removed] Allows immediate reuse of the same password after another one is discarded |
30. (TCO 6) A method signature consists of _____. (Points : 4)
[removed] the method name [removed] the formal parameters [removed] the return type, method name, and formal parameters [removed] the method name and formal parameters
|