Problem

Declaring and Initializing Java Variables In this exercise, you use what you have learn...

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) _____________________________________________________________________

Step-by-Step Solution

Request Professional Solution

Request Solution!

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.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 2
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT