What is the type of the following int(1.0)?
O float
O int
O bool
Answers
Answered by
3
Answer:
float
Explanation:
Answered by
3
INT is the data type of the int(1.0).
About type casting :
- Integer and float datatypes are smaller versus larger, respectively. As a result, whenever you assign an int value to something like a float variable, Java converts it to a float value automatically.
- The two data types may or not be compatible when you transfer a value from one to the other in Java. If the datasets are compatible, Java will convert them automatically.
- It's done fairly, albeit there may be mistakes now and again. Typecasting as well as type conversion are two terms in Java that refer to the same phenomenon.
Similar questions