Professional Documents
Culture Documents
Multiple Choice Questions (10 Points) : What Is The Name of The Java File Containing This Program?
Multiple Choice Questions (10 Points) : What Is The Name of The Java File Containing This Program?
myLibrary.java
ShowSomeClass.java
ShowSomeClass
ShowSomeClass.class
Any file name with the java suffix will do
3.
What is printed?
A.
B.
C.
D.
E.
6
7
8
Columbia
river
CSC142 Quiz 1 2
4.
A constructor
A.
B.
C.
D.
E.
5.
6.
instance variables
instance methods
constructors
all of the above
none of the above
7.
Consider
public class MyClass{
public MyClass(){/*code*/}
// more code...
}
To instantiate MyClass, you would write?
A.
B.
C.
D.
E.
8.
CSC142 Quiz 1 3
9.
10. You read the following statement in a Java program that compiles and
executes.
submarine.dive(depth);
What can you say for sure?
A.
B.
C.
D.
E.