A) zero
B) null
C) their default values.
D) false
Correct Answer
verified
Multiple Choice
A) If a class does not define constructors, the compiler provides a default constructor with no parameters.
B) If you declare a constructor for a class, the compiler will not create a default constructor for that class.
C) The UML models constructors in the third compartment of a class diagram.
D) To distinguish a constructor from a class's operations, the UML places the word "constructor" between double quotes before the constructor's name.
Correct Answer
verified
Multiple Choice
A) compile-time
B) default package
C) paired
D) fully qualified name
Correct Answer
verified
Multiple Choice
A) Most classes you'll use in Java programs must be imported explicitly.
B) There's a special relationship between classes that are compiled in the same directory. By default, such classes are considered to be in the same package-known as the default package.
C) Classes in the same package are implicitly imported into main.
D) An import declaration is not required when one class in a package uses another in the same package.
Correct Answer
verified
Multiple Choice
A) %f
B) %d
C) %fd
D) %r
Correct Answer
verified
Multiple Choice
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.
Correct Answer
verified
Multiple Choice
A) Variables declared in the body of a particular method are local variables and can be used only in that method.
B) A method's parameters are local variables of the method.
C) Every method's body is delimited by left and right braces ({ and }) .
D) Keyword null indicates that a method will perform a task but will not return any information.
Correct Answer
verified
Showing 21 - 27 of 27
Related Exams