Identify and correct the error(s) below:

This code should display in a JTextArea all integers from 100 to 1 in decreasing order.
```
1 String output;
2
3 for ( int counter = 100; counter >= 1; counter++ )
4 {
5 output += counter;
6 }
7
8 displayTextArea.setText( output );
```


The variable output (line 1) must be initialized. The third expression in the for header should read “counter--”
```
1 String output = "";
2
3 for ( int counter = 100; counter >= 1; counter-- )
4 {
5 output += counter + "\n";
6 }
7
8 displayTextArea.setText( output );
```

Computer Science & Information Technology

You might also like to view...

One way to open Task Manager is to:

A) Hold down the Ctrl and Function keys and press Enter B) Hold down the Ctrl and Shift keys and press Esc C) Hold down the Function and Shift keys and press Home D) Hold down the Ctrl and Alt keys and press Enter

Computer Science & Information Technology

Word has the tools which allow you to view videos directly from various web sources without leaving your Word document

Indicate whether the statement is true or false

Computer Science & Information Technology

Most encryption algorithms are _______________, which encrypt data in single "chunks" of a certain length at a time.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

After disabling SSID broadcast, a network administrator still sees the wireless network listed in available networks on a client laptop. Which of the following attacks may be occurring?

A. Evil Twin B. ARP spoofing C. Disassociation flooding D. Rogue access point E. TKIP compromise

Computer Science & Information Technology