3.2.3 Q1: Which of the following statements is false?
a. The javac command can compile multiple classes at once; simply list the source-code filenames after the
command with each filename separated by a comma from the next.
b. If the directory containing the app includes only one app’s files, you can compile all of its classes with the
command javac *.java.
c. The asterisk (*) in javac *.java indicates that all files in the current directory ending with the filename
extension “.java” should be compiled.
d. All of the above are true.
3.2.4 Q1: Which of the following statements is false?
a. In the UML, each class is modeled in a class diagram as a rectangle with three compartments. The top one
contains the class’s name centered horizontally in boldface. The middle one contains the class’s attributes,
which correspond to instance variables in Java. The bottom one contains the class’s operations, which
correspond to methods and constructors in Java.
b. UML represents instance variables as an attribute name, followed by a colon and the type.
c. Private attributes are preceded by the keyword private in the UML.
d. The UML models operations by listing the operation name followed by a set of parentheses. A plus sign (+) in
front of the operation name indicates that the operation is a public.
3.2.4 Q2: Which of the following statements is true?
a. The UML models a parameter of an operation by listing the parameter name, followed by a colon and the
parameter value between the parentheses after the operation name.
b. The UML indicates an operation’s return type by placing a colon and the return value after the parentheses
following the operation name.
c. UML class diagrams do not specify return types for operations that do not return values.
d. Declaring instance variables public is known as data hiding or information hiding.
3.2.5 Q1: You must call most methods other than ________ explicitly to tell them to perform their tasks.
a. public methods
b. main
c. static methods
d. private methods
3.2.5 Q2: A key part of enabling the JVM to locate and call method main to begin the app’s execution is the
________ keyword, which indicates that main can be called without first creating an object of the class in which the
method is declared.
a. stable
b. private
c. static
d. public
3.2.5 Q3: Which of the following statements is false?
a. Most classes you’ll use in Java programs must be imported explicitly.