Assume that the user has entered the value 27 into ageJTextField. Determine what is displayed in outputJTextField by the following code:

```
1 int age = Integer.parseInt( ageJTextField.getText() );
2
3 if ( age < 0 )
4 {
5 outputJTextField.setText(
6 "Enter a value greater than or equal to zero." );
7 }
8 else if ( age < 13 )
9 {
10 outputJTextField.setText( "Child" );
11 }
12 else if ( age < 20 )
13 {
14 outputJTextField.setText( "Teenager" );
15 }
16 else if ( age < 30 )
17 {
18 outputJTextField.setText( "Young Adult" );
19 }
20 else if ( age < 65 )
21 {
22 outputJTextField.setText( "Adult" );
23 }
24 else
25 {
26 outputJTextField.setText( "Senior Citizen" );
27 }
```


The outputJTextField displays “Young Adult”.

Computer Science & Information Technology

You might also like to view...

What is the difference between a text box and a label? Give an example of when you would use each

What will be an ideal response?

Computer Science & Information Technology

Any part of a PivotChart can be selected and formatted

Indicate whether the statement is true or false

Computer Science & Information Technology

What is the SYSVOL folder used for on a Windows Server 2016 system?

A. It is the system volume containing system related files. B. It is the location of scripts, GPOs, and software distribution files related to Active Directory. C. It is the system variable assigned to whatever becomes the C:\ drive once the system is booted. D. It is the temporary volume used by the system when booting the OS.

Computer Science & Information Technology

When you drag and drop colors, if you position the cursor over the interior of an object, the swatch will be applied as a fill. If you position the cursor over the edge, it will be applied as a stroke.

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

Computer Science & Information Technology