What is the output when the following code executes? Assume that power and number are declared as ints.

```
1 power = 5;
2 number = 10;
3 mysteryJTextArea.setText( "" );
4
5 for ( int counter = 1; counter <= power; counter++ )
6 {
7 mysteryJTextArea.append( Math.pow( number, counter ) + "\n" );
8 }
```


The for statement loops 5 times, each time appending to the mysteryJTextArea the value of number (10) raised to the power of counter. The final output contains the values 10, 100, 1000, 10000 and 100000.

Computer Science & Information Technology

You might also like to view...

In a(n) many-to-many relationship, a record in one table can be related to several records in another table and vice versa.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

When a chart is selected, the ________ Tools display three additional tabs, Design, Layout and Format

Fill in the blank(s) with correct word

Computer Science & Information Technology

Everyone involved in the courts has a(n) ________ to protect the legal system and the Constitution

Fill in the blank(s) with correct word

Computer Science & Information Technology

Explain why the Selection Pane is useful.

What will be an ideal response?

Computer Science & Information Technology