Question

Question 1 Not yet answered Marked out of 1.00 Flag question Question text Which of the...

Question 1

Not yet answered

Marked out of 1.00

Flag question

Question text

Which of the following keywords is useful for skipping to the next iteration of a loop?

Select one:

a. do

b. break

c. switch

d. continue

e. while

Clear my choice

Question 2

Not yet answered

Marked out of 1.00

Flag question

Question text

Consider the following line of Java code.
System.out.println("Hello, World!");
"out" is which of the following?

Select one:

a. a statement

b. a class

c. a parameter

d. a method (subroutine)

e. an object

Clear my choice

Question 3

Not yet answered

Marked out of 1.00

Flag question

Question text

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!

Clear my choice

Question 4

Not yet answered

Marked out of 1.00

Flag question

Question text

Consider the following class definition. Which variables can be used in the missing "println" expression on line 17?
public class PrintStuff
2 {
3      public static void main()
4      {
6          {
7              int i = -1;
8              System.out.println(_____);
9          }
10         int j = 1;
11         for (j = 0; j < 10; j++) {
12             System.out.println(_____);
13         }
14         {
15             int k;
16             for (k = 0; k < 10; k++) {
17                System.out.println(_____);
18             }
19         }
20        System.out.println(_____);
21     }
22 }

Select one:

a. Only "j"

b. "j" and "k"

c. Only "i"

d. "i" and "j"

e. Only "k"

Clear my choice

Question 5

Not yet answered

Marked out of 1.00

Flag question

Question text

In a for loop, how many times does the update run?

Select one:

a. At least once, at the end of each iteration.

b. Zero or more times, at the end of each iteration.

c. Exactly once.

d. Zero or more times, at the beginning of each iteration.

e. At least once, at the beginning of each iteration.

Clear my choice

Question 6

Not yet answered

Marked out of 1.00

Flag question

Question text

Which of the following keywords is useful for making a loop that may execute forever or may not execute at all?

Select one:

a. do

b. continue

c. break

d. switch

e. while

Clear my choice

Question 7

Not yet answered

Marked out of 1.00

Flag question

Question text

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 1?

Select one:

a. a method (subroutine) definition

b. a comment

c. a statement

d. a variable declaration

e. a class definition

Clear my choice

Question 8

Not yet answered

Marked out of 1.00

Flag question

Question text

What is output by the following Java program?


class Compute {
    static int compute() { return 42; }
    static int compute(int i) { return i+1; }
    public static void main(String[] args) {
        System.out.println(compute(compute(0)));
    }
}

Select one:

a. 0

b. 42

c. 43

d. 1

e. 2

Clear my choice

Question 9

Not yet answered

Marked out of 1.00

Flag question

Question text

Which one of the following is used in Java programming to handle asynchronous events?

Select one:

a. event handlers

b. short circuits

c. protocols

d. reserved words

e. pragmatics

Clear my choice

Question 10

Not yet answered

Marked out of 1.00

Flag question

Question text

Consider the following Java declaration and assignment statement.
float x = y;
Which one of the following types is "y" NOT allowed to be?

Select one:

a. long

b. float

c. short

d. double

e. int

Clear my choice

Question 11

Not yet answered

Marked out of 1.00

Flag question

Question text

In a for loop, how many times does the continuation condition run?

Select one:

a. Exactly once.

b. Zero or more times, at the end of each iteration.

c. At least once, at the end of each iteration.

d. Zero or more times, at the beginning of each iteration.

e. At least once, at the beginning of each iteration.

Clear my choice

Question 12

Not yet answered

Marked out of 1.00

Flag question

Question text

Assume "test" is a boolean variable. Which of the following expressions is equivalent to "test == false"?

Select one:

a. !test

b. test = true

c. test

d. test.equals(true)

Clear my choice

Question 13

Not yet answered

Marked out of 1.00

Flag question

Question text

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 is on line 3?

Select one:

a. a comment

b. a statement

c. a variable declaration

d. a class definition

e. a method (subroutine) definition

Clear my choice

Question 14

Not yet answered

Marked out of 1.00

Flag question

Question text

Assume that the variables "x" and "y" both have type "int". Which one of the following is NOT a boolean expression?

Select one:

a. x = y

b. x >= y

c. ((x > 0) && (y > 0))

d. (x > 0) ? (x > y) : (x < y)

Clear my choice

Question 15

Not yet answered

Marked out of 1.00

Flag question

Question text

Which one of the following lines of Java code does NOT include a method call?

Select one:

a. compute();

b. int x = compute(y);

c. compute(x,y,z);

d. void compute() {}

e. if (i < 1) { compute(); }

Clear my choice

Question 16

Not yet answered

Marked out of 1.00

Flag question

Question text

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 variable declaration

b. a method (subroutine) definition

c. a class definition

d. a comment

e. a statement

Clear my choice

Question 17

Not yet answered

Marked out of 1.00

Flag question

Question text

Consider the following line of Java code.
System.out.println("Hello, World!");
"println" is which of the following?

Select one:

a. a class

b. a method (subroutine)

c. an object

d. a parameter

e. a statement

Clear my choice

Question 18

Not yet answered

Marked out of 1.00

Flag question

Question text

Consider the following line of Java code.
System.out.println("Hello, World!");
"Hello ,World" is which of the following?

Select one:

a. a class

b. a method (subroutine)

c. an object

d. a parameter

e. a statement

Clear my choice

Question 19

Not yet answered

Marked out of 1.00

Flag question

Question text

Consider the following Java method, which term best describes "'System.out.println("Hello, World!")"?


public static void main(String[] args) {
    System.out.println("Hello, World!");
}

Select one:

a. actual parameter or argument

b. return type

c. modifier

d. formal parameter

e. method call

Clear my choice

Question 20

Not yet answered

Marked out of 1.00

Flag question

Question text

Consider the following class definition. Which variables can be used in the missing "println" expression on line 20?
public class PrintStuff
2 {
3      public static void main()
4      {
6          {
7              int i = -1;
8              System.out.println(_____);
9          }
10         int j = 1;
11         for (j = 0; j < 10; j++) {
12             System.out.println(_____);
13         }
14         {
15             int k;
16             for (k = 0; k < 10; k++) {
17                System.out.println(_____);
18             }
19         }
20        System.out.println(_____);
21     }
22 }

Select one:

a. "j" and "k"

b. Only "j"

c. Only "k"

d. Only "i"

e. "i" and "j"

Clear my choice

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1)  d. continue
2)  e. an object
3)  e. Way too many!
4)  b. "j" and "k"

Add a comment
Know the answer?
Add Answer to:
Question 1 Not yet answered Marked out of 1.00 Flag question Question text Which of the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 1 Not yet answered Marked out of 1.00 Flag question Question text SQL is a...

    Question 1 Not yet answered Marked out of 1.00 Flag question Question text SQL is a programming language for web-site development. Select one: a. TRUE b. FALSE Question 2 Not yet answered Marked out of 1.00 Flag question Question text Moral dimensions of the information age do NOT include _____. Select one: a. Information rights and obligations b. Accountability and control. c. Information safety d. Property rights and obligations Question 3 Not yet answered Marked out of 1.00 Flag question...

  • Not yet answered Marked out of 1.00 Flag question Question text What is the value of...

    Not yet answered Marked out of 1.00 Flag question Question text What is the value of the following Python expression? not(True and False) Select one: True False Question 2 Not yet answered Marked out of 1.00 Flag question Question text Consider the following Python program. fin = open('words.txt') for line in fin: word = line.strip() print(word) What does the program loop over? Select one: a. Lines in a file b. Lines in a list c. Words in a dictionary d....

  • Question 1 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text The statements...

    Question 1 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text The statements inside of a Python loop are known as the ____ of the loop. Select one: a. body b. expression c. counter d. block Question 2 Not yet answered Marked out of 1.00 Not flaggedFlag question Question text The Python 3 program below prints the number 3. s = "Python3" print(s[len(s)]) Select one: True False Question 3 Not yet answered Marked out of 1.00 Not...

  • Question 1 Not yet answered Marked out of 1.00 p Flag question Which of the following...

    Question 1 Not yet answered Marked out of 1.00 p Flag question Which of the following is result of decisions based on inaccurate information? Select one: a. Delivering products to customers on time O b. Meeting customers' demands O c. All the answers d. Misallocation of resources Question 2 Not yet answered Marked out of 1.00 p Flag qu In digital firms, Core business processes are accomplished digitally Select one: a. True о b. FALSE Previous page f Question 7...

  • Question 4 The pH is defined as Not yet answered Marked out of 1.00 P Flag...

    Question 4 The pH is defined as Not yet answered Marked out of 1.00 P Flag question Select one: 0 -log[H] o 10[++] O 10-[H+] O log[H+] Question 5 If the pol of a solution is 4, what is its pH? Not yet answered Marked out of 1.00 Select one: o 7 O 10 p Flag question

  • Not yet answered Graded out of 1.00 Flag question Question text In the process of photosynthesis,...

    Not yet answered Graded out of 1.00 Flag question Question text In the process of photosynthesis, water and carbon dioxide are produced. Select one: True False Question 2 Not yet answered Graded out of 1.00 Flag question Question text In the carbon cycle, combustion produces atmospheric oxygen. Select one: True False Question 3 Not yet answered Graded out of 1.00 Flag question Question text In a balanced chemical equation, the number of each type of atom in the reactants must...

  • Energy is always... Question 4 Not yet answered Marked out of 1.00 P Flag question Select...

    Energy is always... Question 4 Not yet answered Marked out of 1.00 P Flag question Select one: o decreasing o lost • conserved o increasing Question 5 When a compound gains energy the process is Not yet answered Marked out of 1.00 Select one: • endothermic P Flag question O hypothermic exothermic hyperthermic o Question 6 Bonus question: heat will pass by conduction and heat will pass by convection and heat will pass by radiation and that's.... Not yet answered...

  • Question 29 Not yet answered Marked out of 1.00 P Flag question What is the role...

    Question 29 Not yet answered Marked out of 1.00 P Flag question What is the role of substrate-level phosphorylation in glycolysis? Select one: a. a process to synthesize oxygen (02) b. a process to do all of the above (a, b and c) c. a process to synthesize glucose d. a process used to synthesize ATP Question 35 Not yet answered Marked out of 1.00 P Flag question Plants use_to transport sucrose to all regions of the organism. Select one:...

  • 0 Question 1 Not yet answered Marked out of 1.00 P Flag question Which level of...

    0 Question 1 Not yet answered Marked out of 1.00 P Flag question Which level of government responds to a disaster first? Select one a. Federal O b. Local О с. State O d. County/Parish Question 2 Not yet answered Marked out of 1.00 P Flag question What are the best terms to describe the National Disaster Medical System? Select one O a. A mutual aid agreement O b. A search & rescue team Oc. A fedelat-private collaboration d. Operated...

  • Question 1 Not yet answered Marked out of 1.00 P Flag question In a New Zealand...

    Question 1 Not yet answered Marked out of 1.00 P Flag question In a New Zealand snail species, both sexual and asexual populations can be found in the same geographic region. Which hypothesis best explained why this occurs? Select one: a, environmental unpredictability hypothesis b. red queen hypothesis c. multiple niche hypothesis d. All of the above Question 9 Not yet answered Marked out of 1.00 P Flag question Because eggs take more energy investment and are more rare compared...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT