Professional Documents
Culture Documents
Question 1
Correct
Select one:
a. object oriented
b. procedural
c. no-SQL
d. relational
Question 2
Correct
Select one:
a. method
b. class
c. property
d. public
https://my.uopeople.edu/mod/quiz/review.php?attempt=8652269&cmid=310217 1/6
9/22/22, 4:30 AM Self-Quiz Unit 4: Attempt review
Question 3
Correct
If a method does not return any value, what type would it take?
Select one:
a. Integer
b. String
c. void
d. Intents
Question 4
Correct
Select one:
a. private Main {}
https://my.uopeople.edu/mod/quiz/review.php?attempt=8652269&cmid=310217 2/6
9/22/22, 4:30 AM Self-Quiz Unit 4: Attempt review
Question 5
Correct
Select one:
a. System.out.println();
b. printnow();
c. screen();
d. GPS();
Question 6
Correct
The primitive types in Java are byte, short, int, long, float, double, char, boolean. Which one can be used to represent a word like
“Hello”?
Select one:
a. char
c. double
d. long
https://my.uopeople.edu/mod/quiz/review.php?attempt=8652269&cmid=310217 3/6
9/22/22, 4:30 AM Self-Quiz Unit 4: Attempt review
Question 7
Correct
Select one:
a. Int myNumber = 5;
b. myNumber = 5;
d. 5 = myNumber;
Question 8
Correct
To assign a value, Java uses a single “=” sign, as in x=5. What symbol is used to compare variables or values in an if statement?
Select one:
a. .=
b. =.
c. ++
d. ==
https://my.uopeople.edu/mod/quiz/review.php?attempt=8652269&cmid=310217 4/6
9/22/22, 4:30 AM Self-Quiz Unit 4: Attempt review
Question 9
Correct
class Student {
private String firstName;
private String lastName;
public Student(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
// Your code goes here
}
Select one:
a. function
b. static
c. display feature
d. method
https://my.uopeople.edu/mod/quiz/review.php?attempt=8652269&cmid=310217 5/6
9/22/22, 4:30 AM Self-Quiz Unit 4: Attempt review
Question 10
Correct
When using the keyword private before a variable or a method, it means only the class itself can access the variable or method. What
designation would allow access to the variable or the method from any part of the Java program?
Select one:
a. void
b. Integer
c. everyone
d. public
Jump to...
https://my.uopeople.edu/mod/quiz/review.php?attempt=8652269&cmid=310217 6/6