Declaring and Initializing Java Variables
In this exercise, you use what you have learned about declaring and initializing Java variables to answer Questions 1-2.
1. Write a Java variable declaration for each of the following. Use i nt, double, or St ri ng, and choose meaningful variable names.
Declare a variable to store a student ID number (1-1000). _____________________________________________________________________
Declare a variable to store the number of inches in a foot. _____________________________________________________________________
Declare a variable to store a temperature (0.0-130.00). _____________________________________________________________________
Declare a variable to store the name of the state you live in. _____________________________________________________________________
2. Declare and initialize variables to represent the following values. Use int, doubt e, or String, and choose meaningful variable names.
Your hat size (7.5) _____________________________________________________________________
The number of days in a leap year ____________________________________________________________________
The name of your cat, Mindre _____________________________________________________________________
Your cell phone number (999-999-9999) _____________________________________________________________________
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.