Select one:
a. String
b. boolean
c. double
d. short
e. char
Question 2: Consider the following block of Java code. How many times will it output "Hello"?
for (int i = 1; i > 10; i++)
{
System.out.println("Hello");
}
Select one:
a. 0
b. 9
c. 1
d. 10
e. Way too many!
Question 3: Consider the following Java program:
1 public class HelloWorld {
2 // My first program!
3 public static void main(String[] args) {
4 System.out.println("Hello, World!");
5 }
This study source was downloaded by 100000848649392 from CourseHero.com on 08-15-2022 05:43:57 GMT -05:00
https://www.coursehero.com/file/55699350/Programming-unit-3-graded-Quizpdf/
, 6}
What starts on line 1?
Select one:
a. a class definition
b. a variable declaration
c. a comment
d. a statement
e. a method (subroutine) definition
Question 4: Consider the following Java program:
1 public class HelloWorld {
2 // My first program!
3 public static void main(String[] args) {
4 System.out.println("Hello, World!");
5 }
6}
What starts on line 4?
Select one:
a. a method (subroutine) definition
b. a variable declaration
c. a statement
d. a comment
e. a class definition
Question 5
Consider the following block of Java code. How many times will it output "Hello"?
for (int i = 1; i < 10; i--)
This study source was downloaded by 100000848649392 from CourseHero.com on 08-15-2022 05:43:57 GMT -05:00
https://www.coursehero.com/file/55699350/Programming-unit-3-graded-Quizpdf/