The Java Language | Module 2

Course Name: The Java Language (Java as a Second Language Specialization)

Course Link: The Java Language

These are The Java Language Week 2 Coursera Answers


Q1. The FOR loop evaluates a statement with _______ parameters.

  • 0
  • 2
  • 3
  • 1

Answer: 3


Q2. True or False: The code in the FOR loop will execute until the upper limit of the counter is reached.

  • True
  • False

Answer: True


Q3. The center parameter in the FOR loop _________ .

  • intializes the loop counter
  • is the loop counter
  • increments the loop counter
Answer: is the loop counter

Q4. The code in the WHILE loop block will execute until the statement is ________.

  • available
  • True
  • it never executes
  • False
Answer: False

These are The Java Language Week 2 Coursera Answers


Q5. True or False: The while loop never evaluates a condition

  • True
  • False
Answer: False

Q6. True or False: The WHILE loop code block only executes if the loop statement is true.

  • True
  • False
Answer: True

Q7. The key difference between the WHILE and DO-WHILE loops is the DO-WHILE code block always executes __________ .

  • it always executes
  • only when the statement is true
  • at least once
  • only when the statement is false
Answer: at least once

Q8. True or False: With a DO-WHILE loop, the code block executes once, then continues to execute as long as the statement is true.

  • True
  • False
Answer: True

These are The Java Language Week 2 Coursera Answers


Q9. A data structure that holds multiple values of the same data is called _________.

  • a group
  • an array
  • a structure
Answer: an array

Q10. True or False: An array is static in length.

  • True
  • False
Answer: True

Q11. Data members can be added or removed from _______ .

  • a stack
  • an Array List
  • a group
  • a Struct
Answer: an Array List

These are The Java Language Week 2 Coursera Answers

See also  Introduction to Java as a Second Language | Module 4

More Weeks of the course: Click Here

More Coursera courses: https://progiez.com/coursera

These are The Java Language Week 2 Coursera Answers