Professional Documents
Culture Documents
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 4 Quiz
1. Suppose that str1 and str2 are two strings. Which of the statements or expressions are valid?
Mark for Review
(1) Points
Str1 -= str2;
[Correct] Correct
(1) Points
True (*)
False
[Correct] Correct
(1) Points
True
False (*)
[Correct] Correct
4. Two variables are required to support a conversion of one unit of measure to another unit of
measure. True or False? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
(1) Points
Collection
Project
Package (*)
Workspace
[Correct] Correct
Page 1 of 3
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 4 Quiz
(1) Points
/*/
*/
/*
// (*)
[Correct] Correct
7. Match each of the following literals ('x', 10, 10.2, 100L, "hello") with its respective data type.
Mark for Review
(1) Points
[Correct] Correct
(1) Points
apple (*)
7up
boolean
grand Total
(1) Points
boolean, thread, char, double, float, int, long and short
boolean, byte, char, double, float, int, long, and short (*)
[Correct] Correct
10. Which line of Java code assigns the value of 5 raised to the power of 8 to a? Mark for
Review
(1) Points
int a=Math.pow(5,8);
int a=Math.pow(8,5);
double a=15^8;
[Correct] Correct
Page 2 of 3
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 4 Quiz
11. Which of the following is the name of a Java primitive data type? Mark for Review
(1) Points
int (*)
String
Object
Rectangle
[Correct] Correct
12. The following defines a package keyword: Mark for Review
(1) Points
Defines where this class lives relative to other classes, and provides a level of access control. (*)
Provides the compiler information that identifies outside classes used within the current class.
[Correct] Correct
(1) Points
Defines where this class lives relative to other classes, and provides a level of access control.
Provides the compiler information that identifies outside classes used within the current class. (*)
[Correct] Correct
14. The following defines a class keyword: Mark for Review
(1) Points
Provides the compiler information that identifies outside classes used within the current class.
Defines where this class lives relative to other classes, and provides a level of access control.
[Correct] Correct
(1) Points
Defines where this class lives relative to other classes, and provides a level of access control.
Provides the compiler information that identifies outside classes used within the current class.
[Correct] Correct
Page 3 of 3
KVIZ BROJ 02
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 4 Quiz
(1) Points
Workspace
Project
Collection
Package (*)
[Correct] Correct
2. What symbols are required for a compiler to ignore a comment? Mark for Review
(1) Points
*/
/*
/*/
// (*)
[Correct] Correct
3. Eclipse provides an edit area to help you navigate a hierarchy of information. True or False?
Mark for Review
(1) Points
True
False (*)
[Correct] Correct
(1) Points
Provides the compiler information that identifies outside classes used within the current class. (*)
Defines where this class lives relative to other classes, and provides a level of access control.
[Correct] Correct
(1) Points
Defines where this class lives relative to other classes, and provides a level of access control.
Provides the compiler information that identifies outside classes used within the current class.
[Correct] Correct
Page 1 of 3
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 4 Quiz
(1) Points
Example A
Example B (*)
[Correct] Correct
7. When importing another package into a class you must import the entire package as well as
the package classes that will be called. True or False? Mark for Review
(1) Points
True
False (*)
[Correct] Correct
8. Declaring and instantiating a String is much like any other type of variable. However, once
instantiated, they are final and cannot be changed. True or false? Mark for Review
(1) Points
True (*)
False
[Correct] Correct
(1) Points
True (*)
False
(1) Points
AtlanticPacificIndianArcticSouthern
55555
87658
Page 2 of 3
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 4 Quiz
Example A
Example B (*)
Correct
7. When importing another package into a class you must import the entire package as well
Mark for
as the package classes that will be called. True or False?
Review
(1) Points
True
False (*)
Correct
8. Declaring and instantiating a String is much like any other type of variable. However, once
Mark for
instantiated, they are final and cannot be changed. True or false?
Review
(1) Points
True (*)
False
Correct
True or false?
True (*)
False
55555
87658
Page 2 of 3
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 4 Quiz
11.Which line of Java code assigns the value of 5 raised to the power of 8 to a?
Mark for Review
(1) Points
double a=15^8;
double a=pow(8,5);
int a=Math.pow(5,8);
int a=Math.pow(8,5);
Correct
Object
Rectangle
int (*)
String
Correct
Correct
15.Which line of Java code properly calculates the area of a triangle using A=1/2(b)(h)
Mark for Review
where b and h are Java primitive integers?
(1) Points
double A=(double)1/(double)2*b*h; (*)
double A=(double)(1/2)*b*h;
double A=1/2bh;
double A=1/2*b*h;
Correct
Page 3 of 3