click below
click below
Normal Size Small Size show me how
Declare/Assign
Java Declaration and Assignment Statements
| Question | Answer |
|---|---|
| Declare an integer variable named star | int star; |
| Declare a real number variable named kids | double kids; |
| Declare a boolean variable named fut | boolean fut; |
| Declare a character variable named cole; | char cole; |
| Declare a String variable named cheese; | String cheese; |
| Store the number 5 in erceptor | erceptor = 5; |
| Store the number 58.632 in entendre | entendre = 58.532; |
| Store the value false in bozo. | bozo = true; |
| Store the character z in broiled; | broiled = 'z'; |
| Store the string literal in the cheese. | cheese="gouda"; |