Where are all fields declared?
A Inside a main( ) method
B Inside a constructor method( )
C Outside of any method
D In the parameter list -Correct Answer ✔ ✔ Outside of any
method
A reference variable will hold an
A Object
B Address
C Set of fields
D Variable -Correct Answer Correct Answer ✔ ✔ Address
What class is prewritten and used to read input?
,A Scanner
B Input
C Keyboard
D nextInt( -Correct Answer ✔ ✔ Scanner
If your method is reading input from one input stream only, how
many
Scanner objects are needed?
A One object for each data item you are reading
B Two, one to read ints, and one to read doubles
C Only one
D As many as the number of data items your project needed -Correct
Answer ✔ ✔ Only one
What parameter do you send to the constructor of the Scanner class
to
, indicate you will use keyboard input?
A keyboard
B System
C system.in
D System.in -Correct Answer ✔ ✔ System.in
What Java operator allows you to access public methods?
A set operator
B get operator
C new operator
D dot operator -Correct Answer ✔ ✔ dot operator
What keyword is used to declare a constant field?
A private
B final