Declare variables with data type float, int, String, double and boolean and give all of them an
Fantastic news! We've Found the answer you've been seeking!
Question:
Declare variables with data type float, int, String, double and boolean and give all of them an initial sensible value of the appropriate type. Now try to assign the value of each to the other variables (assigning the value of the int variable to the float variable, int variable to the boolean variable, etc...) .
For each assignment statement, answer the following questions:
Which conversions does Java perform automatically?
Which conversions will Java perform with a cast? What are the side effects of these cast(s)?
Hint: you will have to comment out assignment statements that cause a compilation error
How do i code this in java
Related Book For
Posted Date: