Conversion from Long to Double in Java

前端 未结 8 441
隐瞒了意图╮
隐瞒了意图╮ 2021-01-31 01:07

Is there any way to convert a Long data type to Double or double?

For example, I need to convert 15552451L to a

8条回答
  •  清歌不尽
    2021-01-31 01:43

    What do you mean by a long date type?

    You can cast a long to a double:

    double d = (double) 15552451L;
    

提交回复
热议问题