How do I get a decimal answer?

前端 未结 0 727
闹比i
闹比i 2021-01-05 06:16

double first = 9 / 4; System.out.println(first);

When I am trying to execute this code it always prints 2.0 instead of 2.25. My goal here is to get 2.25 as an answer

相关标签:
回答
  • 消灭零回复
提交回复
热议问题