I have the following code in JAVA:
private int metros = 1500, minutos = 60;
System.out.println("Distância em km = "+(metros/1000));
System.out.println("Tempo em horas = "+(minutoa/60));
However what is displayed after the execution of this is 1km and I wanted it to print on the screen the value formatted ex: "1.5 km" without the need to create a double variable, that is, if it is possible.
This same problem applies to hours, for example, when people to split 90 min it should return me 1 and 30 min from the leftovers, instead it returns me 1 hour.